Hi,
Is there a way of formula to avoid the extra spaces or validation on extra spaces.
For Example
Question- Name of the Employee
Answer - Sunita Kaushik (Here are 3 spaces between Sunita and Kaushik)
I want to validate this. when user will answered like this (with extra spaces) Survey form will not be submitted.
Regards,
Sunita
By using regex in the constraint column, you can get your survey to check for a single space.
In its simplest version, you can try ^\w+\b\s\w+$. This will match a first name and a last name, separated by a single space.
To get this expression to catch names with 3 or more (or even 1) parts, you can use grouping. The expression ^\w+(\b\s\w+)*$, which will look for 0 or more instances of words following the first. This will allow your form to take all kinds of names, while still ensuring that only single spaces occur between the various parts of the name.
Hi Sunita
You can use a regex expression in the constraint column to check for this:
regex(${<fieldname>}, "[ ]{2,}")=false() |
Then add a message in the constraint_message column to notify the user.
Hope that helps
Hi DeonLengton,
Thank you very Much. This is Working Fine.
Regards,
Sunita