Field Validation Overview
Field Validations allow the author of a document to restrict what values and the formatting of entered data are permitted to be entered into a field. Foxit eSign provides multiple options for field validation for Text Fields, Text Box Fields, and Date Fields.
Field Validations are great for when data must be entered into a field with a specific format, for example; a form that has its data entered into a database requiring a specific date formatting for entered values.
Jump to Field Validation Topics
• How to Enable Validation for Form Fields
• Text Field Validations Options
• Text Box Validations Options
• Date Field Validations Options
• Custom RegEx Validation Examples
How to Enable Validation for Form Fields
- Select a field from a document while in Draft Mode
- Select Field Properties in the right-hand panel
- Enable and customize field validation settings as needed. Any changes will automatically be saved when clicking outside the settings box.
Text Field Validations
Examples:
- None
- Letters
- Numbers
- Phone 1 (999) 999-9999
- Phone 2 000-999-9999
- Phone 3 999.999.9999
- Currency 1 $9,999,999,999.99
- Currency 2 £9,999,999,999.99
- Currency 3 €9,999,999,999.99
- Canadian SIN 999999999
- EIN 99-9999999
- SSN 999-99-9999
- Custom Validation - (RegEx)
Text Box Validations
Examples:
- None
- Letters
- Numbers
Date Field Validations
Examples:
- MM YY
- YYYY/MMMM
- MMMM/YYYY
- DD-MM-YYYY
- DD-MM-YY
- MM DD YYYY HH:mm:ss
- YYYY/DD/MMMM HH:mm:ss
- DD/MMMM/YY HH:mm:ss
- YY-MM-DD HH:mm:ss
Custom Validation with RegEx
(Available for Business Premium and Enterprise Plans)
RegEx (Regular Expression) searches through a String of text. RegEx may be used for fields containing content that need validation, such as credit card numbers or date of birth. Custom validation may be used on data fields when creating templates or a document. Select the field you would like to use for validation.
In the Field Properties on the right, click the Validation dropdown and select Custom Validation from the dropdown list.
There are two validation types, Error and Warning.
- Error will not let the user confirm signing unless the Regular Expression matches exactly in that specific data field.
- Warning will still let the user confirm signing but warns the user that their input may not match the field's Regular Expression exactly.
Test a Regular Expression by entering a Test String and click Test Validation.
Regex Examples
Phone Number
/^\b\d{3}[-.]?\d{3}[-.]?\d{4}\b$/
Visa Card
^4[0-9]{12}(?:[0-9]{3})?$
Master Card
^5[1-5][0-9]{14}|^(222[1-9]|22[3-9]\\d|2[3-6]\\d{2}|27[0-1]\\d|2720)[0-9]{12}$
Month Day, Year (May 5, 2021)
(.*)(((1[0-2]|0?[1-9])\/(3[01]|[12][0-9]|0?[1-9])\/(?:[0-9]{2})?[0-9]{2})|((Jan(uary)?|Feb(ruary)?|Mar(ch)?|Apr(il)?|May|Jun(e)?|Jul(y)?|Aug(ust)?|Sep(tember)?|Oct(ober)?|Nov(ember)?|Dec(ember)?)\s+\d{1,2},\s+\d{4}))(.*)