Updating validator options

When setting validator options for fields, the usual way is
FormValidation.formValidation(yourForm, {
fields: {
fieldName: {
validators: {
validatorName: {
// The error message
message: '...',
// Other validator options
// ...
},
},
},
},
});
The following example demonstrates the ability of updating message and validator options on the fly. It is simple job application form which asks user to upload the correct file based on the selected job position.
The validator options can be updated via the updateValidatorOption() method.
Updating validator options