validate method
Validates data against existing validation rules.
Documents are always valid if no validation rules are defined on the provided index and collection.
This request does not store the document.
Implementation
Future<bool> validate(
String index,
String collection,
Map<String, dynamic> document,
) async {
final response = await kuzzle.query(KuzzleRequest(
controller: name,
action: 'validate',
index: index,
collection: collection,
body: document,
));
return (response.result as Map<String, dynamic>)['valid'] as bool;
}