rule
Specification
A synchronous rule applied to the field as the top priority validation. When the rule rejects, all the remaining validation chain is ignored.
Definition
type Rule = RegExp | (params) => booleanParameters
The following parameters are exposed to the rule when it is a function:
Parameter name
Type
Description
value
any
The current value of the field.
fieldProps
Object
Props of the current field.
fields
Object
Map of all fields.
form
Object
A reference to the current Form
Example
Regular expression
Resolver function
Reactive rule
Last updated