Constructor
Gets the raw schema, as object type
Provides the reason test() returned false, if any
The object to test
The provided error
Sanitizes an object.
The object to test
The sanitized object
Tests the schema against an object
The object to test
true if it matches the schema, false if it does not match
Sets default value, in case the object is null, undefined or cannot be parsed
The default value
self
Sets an enumeration of allowed values
The enumeration
self
Sets max length for the string. If the string length is greater than this value, it will be truncated.
The max length for the string.
self
Sets a regular expression the string must match
The regular expression
self
Creates string schema
a new instance of StringObjectSchema
Generated using TypeDoc
String schema