Textbox Validations

Textbox Validations

 

Depending on the input expected from your visitor, you can add different types of validations to the textbox.

When you select a textbox element from the left side element tree in the input validations page,a tabbed box containing the textbox validations are shown on the right side.

 

Basic Validations

Required Field

The visitor must provide input to this field

 

Input Type
Validate the data type of the field

 

The following types are supported:

 

  • Alphabetic

Only English alphabetic characters allowed.

 

  • Alpha-Numeric

English alphabetic characters and numeric characters allowed.

 

For both the types above, no spaces are allowed by default; if you want to let spaces, then select the 'Allow spaces' checkbox.

 

  • Numeric

Only numbers allowed.(examples: 23.14 -1000 1000.00 1,000,000 )

 

  • Email

Validates the input for an email pattern

Size

You can limit the size of the input using the size validations. In order to enable a validation, select the checkbox next to it.

 

  • Max. Length

The maximum number of characters that the input can contain.

 

  • Min. Length

The minimum number of characters that the input should contain.

 

  • Greater Than

The input value should be greater the given value. ( The input type should be Numeric )

 

  • Less Than

The input value should be less the given value. ( The input type should be Numeric )

 

Comparisons

It is quite often required that you want to validate by comparing the values of the input fields.

You can add comparison validations in the 'Comparisons' tab. The left side in the comparison tab has a listbox that will contain all the comparison validations.

There are buttons for adding and removing the comparison validations in the right bottom side.

 

'Add' button
To add a comparison validation, press the Add button.
This opens the 'Add Comparison' dialog box Select the comparison and the other input field to compare it to. Press OK. You can add more than one comparison validations for the same input field.

 

Remove
This button is to remove a previously added comparison validation.
Select the comparison from the list and press the 'Remove' button.

 

Pattern

This validation could be used if you are expecting a fixed pattern in the input (like phone number, SSN etc)

In addition, the pattern validation could be used to limit the allowed/disallowed characters.

The pattern matching requires a coded string known as 'Regular expression'.
If you have the regular expression you can provide it directly in the 'regular expression' box.

 
For easily creating the regular expression patterns there are two methods:

 

Make Pattern
You can use a wizard if you want to limit the allowed/disallowed characters in the input. Click on the 'Make pattern' button to open the 'Make Pattern Wizard'

 

Select from List
Click the 'Select from list' button to open the list of ready-made regular expression patterns. If the pattern required is provided in the list, you can select it and press OK.