foundation-forms.mustmatch
Home > @genesislcap/foundation-forms > mustMatch
mustMatch() function
Ensures the value of the current field (the one the validator is on) matches the one of the target field.
Signature:
mustMatch: (target: string) => (data: any, path: any, label: any) => {
instancePath: string;
message: string;
schemaPath: string;
keyword: string;
params: {};
}[]
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
target |
string |
any other field |
Returns:
(data: any, path: any, label: any) => { instancePath: string; message: string; schemaPath: string; keyword: string; params: {}; }[]
a validator function that will be run by the smart form during the client-side validation stage