This function validates the contents of a single field.
The function is supplied with the name of the field and a DOM element, or its server-side equivalent, that represents the current form. It should return true if the field is valid. If the field is invalid it should return false and append a validation failure result object to the supplied array.
Arguments
| Argument | Type | Description |
|---|---|---|
| fieldName | String, required | The name of the field to validate |
| currentForm | Object, required | DOM-style object for the current form |
| failureArray | Array, required | An array of validation errors |
Returns
Boolean
Last modified on 6 August 2021
