Lets make all of the below result in a validator and that we have tests for it
馃敜 String Constraints
minLength: Minimum number of characters
maxLength: Maximum number of characters
pattern: Regular expression the string must match
馃敘 Number / Integer Constraints
minimum: Minimum value (inclusive)
maximum: Maximum value (inclusive)
exclusiveMinimum: Must be strictly greater than this value
exclusiveMaximum: Must be strictly less than this value
multipleOf: Must be a multiple of the given number
Other
const: Value must match exactly
馃摝 Array Constraints
minItems: Minimum number of elements
maxItems: Maximum number of elements
uniqueItems: All elements must be unique
馃З Object Constraints
minProperties: Minimum number of properties
maxProperties: Maximum number of properties
Lets make all of the below result in a validator and that we have tests for it
馃敜 String Constraints
minLength: Minimum number of charactersmaxLength: Maximum number of characterspattern: Regular expression the string must match馃敘 Number / Integer Constraints
minimum: Minimum value (inclusive)maximum: Maximum value (inclusive)exclusiveMinimum: Must be strictly greater than this valueexclusiveMaximum: Must be strictly less than this valuemultipleOf: Must be a multiple of the given numberOther
const: Value must match exactly馃摝 Array Constraints
minItems: Minimum number of elementsmaxItems: Maximum number of elementsuniqueItems: All elements must be unique馃З Object Constraints
minProperties: Minimum number of propertiesmaxProperties: Maximum number of properties