FormConfigInterface
Fields available on FormConfigInterface.
| Property | Type | Required |
|---|---|---|
form | string | required |
fields | object | optional |
ajaxOptions | any | optional |
errorType | `“inline” \ | “modal”` |
customErrorMessages | object | optional |
Example
NFSFU234FormValidation.configureForms([
{
form: '#loginForm',
fields: {
email: { required: true, type: 'email' },
password: { required: true, minLength: 8 }
},
ajaxOptions: { RequestMethod: 'POST', RequestType: 'json' }
},
{
form: '#profileForm',
fields: {
avatar: { accept: ['image'], maxSizeMB: 2, maxWidth: 1000, maxHeight: 1000 }
}
}
]);
// once per page - only wires up whichever registered form actually exists on this page
NFSFU234FormValidation.autoInit();See also: FieldRuleInterface.
Used by
Last updated on