How to use Validation: Contains

Validate that a form field contains only alphanumeric characters.

Overview

The user attempted to use the 'Contains' validation type, which checks for a specific substring, but needed to restrict input to letters and numbers only.
Use the 'Regex' validation type instead and apply the provided regular expression pattern to allow only alphanumeric characters without spaces or specials.

Answered
ChronoForms v6
om omidhz 07 Aug, 2019
I can't figure out how to use the validation "Contains" field. I want users to be able to enter numbers and letters only (No space or special characters), but I'm not sure what language/code should I enter here for that purpose.
Thanks
he healyhatman 07 Aug, 2019
Answer
You need regex, not "contains".

/^[A-Za-z0-9]*$/
om omidhz 07 Aug, 2019
Thank you. That worked.
However, for my knowledge, what is the use for "contain" and how do you use it?
This topic is locked and no more replies can be posted.