Module validators

Module validators 

Source
Expand description

Custom validators for different JSON types

Functionsยง

any
Match any value.
array
Match each array element to a specific validator.
array_empty
Match empty array.
array_for_each
Match if each element match the validator
array_size
Match the array size.
bool
Match if bool match predicate.
eq
Match a value equals the expected value.
f64
Match if number match predicate.
i64
Match if number match predicate.
null
Match if null.
object
Match if each key/value pair matches
object_empty
Match if the object is empty.
object_strict
Match if each key/value pairs matches. Fail if a key is missing in the validators.
string
Match if string match predicate.
u64
Match if number match predicate.