Skip to Content
NFSFU234FormValidation v3 is here — file upload validation, config-driven rules, and more.
v3 (current)formConfigInterface

FormConfigInterface

Fields available on FormConfigInterface.

PropertyTypeRequired
formstringrequired
fieldsobjectoptional
ajaxOptionsanyoptional
errorType`“inline” \“modal”`
customErrorMessagesobjectoptional
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