validate #
Validates data against existing validation rules.
Note that if no validation specifications are set for the <index>
/<collection>
, the document will always be valid.
This request does not store or publish the document.
Future<bool> validate(
String index,
String collection,
Map<String, dynamic> document,
)
Argument | Type | Description |
---|---|---|
index | String | Index name |
collection | String | Collection name |
document | Map<String, dynamic> | Document to validate |
Returns #
Returns a boolean value set to true if the document is valid and false otherwise.
Usage #
final result = await kuzzle
.document
.validate('nyc-open-data', 'yellow-taxi', {
'key': 'value',
});
Edit this page on Github(opens new window)