Make the validator optional. To be optional, the value must be either an empty string or null.
null
useForm(({ optional, regex }) => ({ email: [ optional(regex(/^\S+@\S+$/)) ] }));
The optional validator.
The validation options.
The validation object.
Generated using TypeDoc
Make the validator optional. To be optional, the value must be either an empty string or
null
.useForm(({ optional, regex }) => ({ email: [ optional(regex(/^\S+@\S+$/)) ] }));