Form Builder‎ > ‎Form Fields‎ > ‎

Validation


Action form allows you to apply validation to the text fields of the action form using the Custom Validation options available in the Validations window. You can add up to two custom validations to the Title text fields, Custom Validation #1 and Custom Validation #2. They both list seven of the same validations. You can include more validations to the list by adding them to the /DesktopModules/AvatarSoft/ActionForm/Validators folder. The standard validations are listed on Figure 1.

Figure 1: Displays Custom Validation Option

Apply Custom Validations

  1. To apply custom validations, click on the Validations option identified with the blue arrow on Figure 2. The validations window will open.

    • Custom validations are listed in the Custom Validation #1 and Custom Validation #2 drop down menus, identified with the green arrows on Figure 2.

    • You can apply one or both custom validations to the text field.

  2. Then click on one or both Custom Validation drop down menu. If you do not want to apply a custom validation, select No Validator.

  3. To set a required text field, select the Field is Required check box identified with the orange highlight on Figure 2. If this option is checked the user is unable to submit the form unless they complete this field.
Figure 2: Identifies Validations Window and Custom Validation drop down boxes


Email Address Validation

Email Address validation allows you to apply the email address format to text fields. It requires the user to enter a valid email format, for example myemail@yahoo.com. If the user enters a different format, the form returns "The email address is invalid!" error message. 

Email Address Validation Example

  1. In Figure 3, Email is entered for the Title field to specify that the user should enter an email address.

  2. Then Small Text is selected from the Type drop down menu to specify the Email text field is a small text type.

  3. Then Email Address is selected from Custom Validation #1 to specify the Email text field requires a valid email address.

    Figure 3: Identifies Email Address Validation



  4. On the action form, identified in Figure 4, myemail is entered for the email address. Since this is not a valid email address the form returns "The email address is invalid!" error message.

Figure 4: Displays error message for Email Address Validation



Email Address Validation Example #2

  1. In Figure 5,  Email is entered for the Title field to specify that an email address is required.

  2. Then Email is selected from the Type drop down menu to specify the Email text field has the email address type.

  3. Then Email Address is selected from Custom Validation #1 to specify the Email text field requires a valid email address.

    Figure 5: Identifies Email Type and Email Address Custom Validation


  4. On the action form, identified on Figure 6, myemail is entered for the email address. 

    • Notice there are two error messages on Figure 6; "invalid email" and "The email address is invalid" error messages.

    • When you select Email for the Type and Email Address for custom validation you will receive the 2 error messages identified with the green arrow on Figure 6.
Figure 6: Displays Error Messages for Email Type and Email Address Custom Validation


Web Address Validation

Web Address validation allows you to apply the web address format to text fields. It requires the user to enter a valid web address, for example www.mywebpage.com. If the user enters a different format, the form returns "The web address is invalid!" error message.

Web Address Validation Example 

  1. In Figure 7, Company Web Address is entered for the Title field to specify that the user should enter their company's web address.

  2. Then Large Text is selected from the Type drop down menu to specify the Company Web Address text field has a large text field.

    • The Large Text type allows the user to resize the text box using the controls at the bottom right of the text box.

  3. Then Web Address is selected from Custom validation #1 to specify the Company Web Address text field requires a valid web address.

    Figure 7: Identifies Web Address Custom Validation



  4. On the action form, identified on Figure 8, we is entered for the company web address.  Since this is not a valid web address, the form returns "The web address is invalid!" error message, identified with the yellow arrow.

    • Notice the resize controls identified with the blue arrow. It allows the user to resize the text box if necessary.

Figure 8: Displays Web Address Validation Error Message

Integer Number Validation

Integer Number validation allows you to apply the integer number format to text fields. Users are able to input integer numbers only into applicable text fields, for example 12345. The user is not allowed to enter decimals, symbols, or letters. If the user enters a format other than an integer, the form returns "Input must be an integer number!" error message.

Integer Number Validation Example

  1. In Figure 9, Zip Code is entered for the Title field to specify that the user should enter their zip code.

  2. Then Number is selected from the Type drop down menu to specify that the user should enter an integer.

  3. Then Integer Number is selected from Custom Validation #1 to specify the Zip Code text field requires an integer number.

    Figure 9: Identifies Integer Number Custom Validation and Number Type



  4. On the action form, identified on Figure 10, 39/9 is entered for the zip code.  Since this is not a valid number or integer number, the form returns two error messages; "invalid number" and "Input must be an integer number".

    • The "invalid number" error message results from the Number type.

    • The "Input must be an integer number" error message from the Integer Number custom validation. 
Figure 10: Displays Error Message Number Type and Integer Number Validation


Floating Point Number Validation

Floating Point Number validation allows you apply the floating point number format to text fields. Users are able to input decimal numbers, for example 8.8009. Users are not allowed to enter integer numbers, symbols or letters. If the user enters a format other than floating point, the form returns "Input must be a floating point number!" error message.

Floating Point Number Validation Example
  1. In Figure 11, Product Price is entered for the Title field to specify that the user should enter the price of the product.

  2. Then Small Text is selected from the Type drop down menu to specify the text field is a small text type.

  3. Then Floating Point Number is selected from Custom Validation #1 to specify the Product Price text field requires a floating point number.

    Figure 11: Identifies Floating Point Number Custom Validation


  4. On the action form, identified on Figure 12, $8.99 is entered for the product price. Since this is not a valid floating number the form returns "input must be a floating point number!"  error message.

    • The number is an invalid floating point number because it has a dollar ($) symbol. The floating point number validation does not allow symbols in the text field.
Figure 12: Displays Floating Point Number Error Messages


Strip HTML Validation

Strip HTML validation allows you to apply the strip html format to text fields. Users are able to input html tags, for example <h3>. When users enter html tags and symbols, the html tags and symbols are stripped from the text when the user submits the form.

Strip HTML Validation Example
  1. In Figure 13, Comments is entered for the Title field to specify that the user should enter comments.

  2. Then Large Text is selected from the Type drop down menu to specify the text field is a large text field.

  3. Then Strip HTML is selected to specify the Comments text field accepts html tags and symbols.

    • Strip HTML validation is selected to specify that the text field accepts html tags, for example forward slashes(/), back slashes and left(<) and right arrows (>).

      Figure 13: Identifies Strip HTML Custom Validation



  4. On the action form, identified on Figure 14,  <.@/ | Send Product Details & is entered for the comments.

    • The comments are stripped(or removed) of the symbols and Send Product Details is submitted instead.

    • Notice the size controls identified with the blue arrow on Figure 14. It allows the user to resize the text box accordingly.

Figure 14: Displays Comments in a Strip HTML text box


Phone Number Validation

Phone Number validation allows you to apply the phone number format to text fields. Users are able to input phone numbers using the (###) ###- #### format. Users are able to enter numbers only for the phone number, for example 9099990000, or use the open and closed parentheses around the first three numbers of the phone number, for example (909)999-0000. If the user enters a different format the form returns, "Phone number must be in format (###) ###-####!" error message.

Phone Number Validation Example
  1. In Figure 15, Phone Number is entered for the Title field to specify that the user should enter a phone number.

  2. Then Small Text is selected from the Type drop down menu to specify the text field is a small text type.

  3. Then Phone (###) ###-#### is selected from the Custom validation #1 drop down menu to specify that the text field requires a valid phone number.

    Figure 15: Identifies Phone Number Custom Validation


  4. On the action form, identified on Figure 16, 909_000-9888 is entered for the phone number. Since this is not a valid phone number the form returns "Phone number must be in format (###) ###-####!" error message.

    • This is not a valid phone number because there is an underscore. The only valid symbols allowed in phone number validation text fields are open and closed parentheses and hyphens.
Figure 16: Displays Phone Number Validation Error


Comments