SDK
SDK Dart Null Safety v3.x
2

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.


Copied to clipboard!
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 #

Copied to clipboard!
final result = await kuzzle
  .document
  .validate('nyc-open-data', 'yellow-taxi', {
    'key': 'value',
  });