It represents a simple schema builder for object validation. Three schemas are available: StringSchema
, NumberSchema
and MapSchema
. They can check if the object isn't empty but also have different features according to the type of an object to validate. You can use all methods in the scheme at once or separately.
Schema to validate String.class objects. It has two specific methods:
- to define minimum length of the line,
- to verify that the line contains certain symbol or phrase.
Schema to validate Integer.class objects. It also has two specific methods:
- to check if the number is positive,
- to verify that the number falls within the defined range.
Schema to validate Map.class objects. It has two additional methods:
- to define total number of entries,
- to validate entry values according to the schema chosen specifically for every key.