Skip to main content
Version: 10.1

Field validation

note

This article covers field validators as a way of getting early user feedback. This is part of the UI Library. The UI Library is a mixed bag of Javascript extensions for programming UI controls in USoft web pages. Do not confuse with the structured UDB object model for data exchange between USoft web pages and a Rules Engine.

Field validation is attractive for for early user feedback. USoft has field validation built in by default. An adjusted version of the jQuery validator plug-in is incorporated (jquery.validate.js) to facilitate this. The plug-in comes with a default set of validators. The entire control is well documented at http://jqueryvalidation.org/documentation/.

USoft provides an additional set of validators that can be found in the usoft.ui.validator.js file:

ValidatorExplanation
patternAllows a field value to be validated against a regular expression.
biccodeChecks that the field value is a valid BIC code.
ibanChecks that the field value is a valid IBAN code.
udb-mandatoryChecks that the field value meets the Mandatory check defined at domain level.
udb-numericChecks that the field value meets the number format check defined at domain level.
udb-ioformatChecks that the field value meets the IO Format check defined at domain level.
udb-value-listCheck that the field value is one of the allowed values defined for the domain.
  • If a field value is validated as being correct, the value 'valid' is added to its class list.
  • If a field value is validated as being incorrect, the value 'error' is added to its class list.
  • If one of the domain checks is violated, the value 'domain-error' is added to the class list.

Additionally, an error message is displayed as visual feedback to the user, where applicable.