How to use Validation: Contains

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
healyhatman 07 Aug, 2019
Answer
You need regex, not "contains".

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