SDK
SDK Java v3.x
2

This SDK is deprecated. We recommend to use the Kuzzle SDK-JVM.
A migration guide is available here

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!
public CompletableFuture<Boolean> validate(
      final String index,
      final String collection,
      final ConcurrentHashMap<String, Object> document)
throws NotConnectedException, InternalException
Argument Type Description
index
String
Index name
collection
String
Collection name
document
ConcurrentHashMap<String, Object>
Document to validate

Returns #

Returns a boolean value set to true if the document is valid and false otherwise.

Usage #

Copied to clipboard!
ConcurrentHashMap<String, Object> document = new ConcurrentHashMap<>();
document.put("key", "value");
Boolean result = kuzzle
.getDocumentController()
.validate("nyc-open-data", "yellow-taxi", document)
.get();