SDK
SDK Dart v2.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.


Future<bool> validate(
    String index,
    String collection,
    Map<String, dynamic> document,
  )
ArgumentTypeDescription
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',
  });