When creating a form for use on your landing pages, or website you may have noticed the 'validation' option sitting on your right hand menu.
The validation option allows you to do a number of things for each individual field, from making the field compulsory (Required = checked), or choosing what format option you'd like people to reply with, for example, letters and digits.
What does 'Required' do?
The 'required' option, when selected in the 'validation' section allows you to select fields that should be compulsory. By checking this option, the end-user will not be able to proceed with completion of the form without inputting data within the field.
What does Min length and Max length do?
The 'Min' and 'Max' length options allow you to set a minimum or maximum value that should be inputted within the field itself. For example in the instances of 'mobile phone' you may want to set a minimum value to ensure people complete the field correctly.
What does format do?
The format option allows users to select what should be inputted within their fields. For example, if this is set to 'Letters only', the end-user will only be able to input letters, and it will be an invalid input if it includes special characters or digits.
How do I use each format option?
- URL: This validation option will allow users to only input a valid URL, i.e. https://force24.co.uk/ within the input
- Guid: A GUID (globally unique identifier) is a 128-bit text string that represents an identification (ID). Using this option will mean users will have to input a valid ID meeting that criteria.
- Letters Only: Letters will only be accepted into this input.
- Letters and Digits: Letters, digits will only be accepted within this input.
- Custom: The custom option allows you to add your own regular expression into the field. Regular expression is simply a description of the characters you want to match. So for example, if you would like to include the complete alphabet in capitals and lowercase as something available to the user, you would use [a-zA-Z]+, and list the other options that should be available e.g. [a-zA-Z-:;\+]+ this would mean, non-case sensitive alphabet, and a colon, semi-colon, plus, and minus icon.