Protected
isProtected
preprocessorsA list of preprocessors associated with the Builder
Protected
typeProtected
validatorsA list of validators associated with the Builder
Adds a preprocessor
to a preprocessors list
Adds a validator
to validators list.
Cancels endsWith()
call.
Cancels equals()
call.
Cancels matches()
call.
cancel maxLength()
call.
Cancel minLength()
call.
Remove all preprocessors for this schema.
Cancels startsWith()
call.
Remove all validators for this schema.
Protected
createProtected method used to create an new instance of the Builder
defined by the props
object. Should be used to instanticate new
builders to keep builder's immutability.
arbitrary props object
Restricts string to end with val
.
Restricts object to be equal to value
.
Generates a serializable object describing the defined schema
If set, restrict string to end with a certain value.
If set, restrict object to be equal to a certain value.
If set to false
, schema will be optional (null
or undefined
values
will be considered as valid).
If set, restrict string to match a certain regular expression.
Max length of the string (if defined).
Min length of the string (if defined).
Array of preprocessor functions
If set, restrict string to start with a certain value.
String id
of schema type, e.g. string',
numberor
object`.
Array of validator functions
Restricts string to match regexp
.
Set maximal length of the valid value for schema.
length
Set minimal length of the valid value for schema.
Protected
preRestricts string to start with val
.
Performs validion of string schema over object
.
Optional
context: ValidationContextOptional ValidationContext
settings.
Static
createGenerated using TypeDoc
Allows to define a schema for a string. It can be: required or optional, restricted to be equal to a certain value, restricted to have a certain length, restricted to start with a certain value, restricted to end with a certain value, restricted to match a certain regular expression.
NOTE this class is exported only to give opportunity to extend it by inheriting. It is not recommended to create an instance of this class directly. Use () function instead.
Example
Example
Example
Example
Example
Example
See
string