Previous pageData Integration Next page
Field Validation 

Validation

The Data Entry Form enables you to set validation criteria to help ensure sensible information is collected by the form, and you can display and style validation errors on the Data Entry Form's surfaces.

Validation criteria follow the normal logical rules, and the 'Error Message' field enables you to create a custom error notification.

If you are validating against a 'blank' criterion (to ensure a form field has been entered) simply leave the Value empty.

Date Fields
Fields of the type 'date' are a special case.

The system uses 1/1/1000 to represent a blank date in the database, so a criterion of:
1000-01-01 00:00
will select them.

Validate against a Regular Expression (RegEx)

neatComponents supports field validation against Regular Expressions.

The following example provides a general check for the validity of an Email Address.

 
In the Validation-tab - locate the Operator option: "Match" from the on-click drop-down.
 
Select that and click on the value row, it will open a Regular Expression dialog - give it a 'Name' (in this example: Email check) - then in the Settings-tab  use the pattern:
 
^[\w\-_\+]+(?:\.[\w\-_\+]+)*@[\w\-_]+(?:\.[\w\-_]+)+$
 
 
Here is a similar validation - this time for Phone Numbers:
 
^(\(\d\d\d\) |\d\d\d\-)\d\d\d\-\d\d\d\d$
 
 
There is a 'Test' function. That works on-keystroke so it will check the entry as you make it.

 

Displaying 'validation errors'

Back on the Surface of the Data Entry Form | Record Edit View you need to Embed the 'Error Text Surface', and then you get the errors shown - like the example highlighted below.