Build custom UI validations for form fields
Configure custom validations for the forms to suit your requirements.
On the Form Field details screen, turn ON the on the Validation Required field and navigate to the Manual Validation tab in the Conditional Logic window. Enter the string in the UI Validation field.
Following are a few examples of UI validation syntax:
Validation Description | Validation syntax | Operator (#R) | Example |
---|---|---|---|
Date Validation | 1:(D)(E) <PROPERTY> #R CD | EQ, NE, GT, LT, LE, GE | Shows error message if date selected in the field is current date |
Mandatory Validation based on input in another field | 1:(E) <PROPERTY1> #R MANDIT IF <PROPERTY2> #R EMPTY | EQ, NE | Prompts to enter Field1 if Field2 is empty |
Value Validation | 1:(E) <PROPERTY1> #R MANDIT IF <PROPERTY2> #R (V)Value | EQ, NE, GT, GE, LE, LT | Prompts to enter Field1 if value in Field2 is 100 |
Value Validation with OR condition | 1:(E) <PROPERTY1> #R MANDIT IF <PROPERTY2> #R (V)Value1 OR <PROPERTY2> (V)Value2 | EQ, NE, GT, GE, LE, LT | Prompts to enter Field1 if the value in Field2 is 100 or Field3 is 50 |
Value Validation with AND condition | 1:(E) <PROPERTY1> #R MANDIT IF <PROPERTY2> #R (V)Value1 AND <PROPERTY2> (V)Value2 | EQ, NE, GT, GE, LE, LT | Prompts to enter Field1 if the value in Field2 is 100 and field3 is 50 |
Value Validation with between condition | 1:(E) <PROPERTY1> EQ MANDIT IF <PROPERTY2> BT (V)Value1 AND (V)Value2 | Prompts to enter Field1 if the value in Field2 is between 100 and 300 | |
Auto-populate value validation | 1:(AP) PROPERTY1 EQ (V)Value IF PROPERTY2 EQ (V)Value | Populates Field1 as 40 if the value in Field2 is 100 | |
Auto-populate Date validation | 1:(DAP) PROPERTY1 EQ (V)Value IF PROPERTY2 EQ CD | Populates Field1 as 40 if current date is selected Field2 | |
Auto-populate validation with OR condition | 1:(AP) PROPERTY1 EQ (V)Value1 IF PROPERTY2 EQ (V)Value2 OR PROPERTY3 EQ (V)Value3 | Populates Field1 as 40 if the value in Field2 is 50 or Field3 is 60 | |
Auto-populate validation with AND condition | 1:(AP) PROPERTY1 EQ (V)Value1 IF PROPERTY2 EQ (V)Value2 AND PROPERTY3 EQ (V)Value3 | Populates Field1 as 40 if the value in Field2 is 50 and Field3 is 60 | |
Disable Value Validation | 1:(DI) PROPERTY1 EQ (V)Value IF PROPERTY2 EQ (V)Value | Disable Field1 if the value in Field2 is 100 | |
Disable Date Validation | 1:(DDI) PROPERTY1 EQ (V)Value IF PROPERTY2 EQ CD | Disable Field1 if the value in Field2 is current date | |
Disable validation with OR condition | 1:(DI) PROPERTY1 IF PROPERTY2 EQ (V)Value2 OR PROPERTY3 EQ (V)Value3 | Disable Field1 if the value in Field2 is 100 or Field3 is 200 | |
Disable validation with AND condition | 1:(DI) PROPERTY1 IF PROPERTY2 EQ (V)Value2 AND PROPERTY3 EQ (V)Value3 | Disable Field1 if the value in Field2 is 100 and Field3 is 200 | |
Hide Value Validation | 1:(HI) PROPERTY1 IF PROPERTY2 EQ (V)Value | Hides Field1 if the value in Field2 is 100 | |
Hide validation with OR condition | 1:(HI) PROPERTY1 IF PROPERTY2 EQ (V)Value2 OR PROPERTY3 EQ (V)Value3 | Hides Field1 if the value in Field2 is 100 or Field3 is 200 | |
Hide validation with AND condition | 1:(HI) PROPERTY1 IF PROPERTY2 EQ (V)Value2 AND PROPERTY3 EQ (V)Value3 | Hides Field1 if the value in Field2 is 100 AND Field3 is 200 | |
Regular Expression for Decimal Places | 1:(RE) PROPERTY1 EQ ^([0-9]*)(.([0-9]{0,2})?)?$ | Shows the value entered in field with two decimals like 127.34 | |
Include Validation | 1:(IN)(E) <PROPERTY1> IN (V)Value1 IF <PROPERTY2> #R <PROPERTY3> | EQ, NE, GT, GE, LE, LT | |
Calculate difference between two Time fields | 1:(TC) <PROPERTY1> #R <PROPERTY2> | SUB | |
Calculate difference between two Date fields | 1:(DC) <PROPERTY1> #R <PROPERTY2> | SUB | |
Calculate difference between two fields | 1:(F) <PROPERTY1> SUB <PROPERTY2> | SUB | Populates the result in the field for which the validation is configured |
Add values in two fields | 1:(F) <PROPERTY1> ADD <PROPERTY2> | ADD | Populates the result in the field for which the validation is configured |
Validations with Addition and Division | 1:(F) (<PROPERTY1> ADD <PROPERTY2>) DIV PROPERTY3 | ADD, DIV | Populates the result in the field for which the validation is configured |
Validations with Addition and Division - Complex | 1:(F) (<PROPERTY1> ADD <PROPERTY2>) DIV (<PROPERTY3> ADD <PROPERTY3>) | ADD, DIV | Populates the result in the field for which the validation is configured |
Auto-populate fields based on calculation | 1:(AP) <PROPERTY1> EQ (V)100 IF (<PROPERTY2> ADD <PROPERTY3>) GT (V)3 | Populate Field1 as 100 if the sum of Field2 and Field3 is greater than 20 | |
Mandate fields based on calculation | 1:(E) <PROPERTY1> EQ MANDIT IF (<PROPERTY2> SUB <PROPERTY3>) GT (V)3 | Mandates Field1 if the difference between values in Field2 and Field3 is greater than 20 |