Closed RajuMenon closed 6 years ago
The regex should be ^([^0-9]+)$
and be used together with the validator letternumeric
that comes with the security module.
Thanks, that solved the issue.
Just adding the code here for anyone else who is facing this issue:
<input name="firstName" type="text" id="firstName" value="" class="form-control" tabindex="13" data-validation="required custom letternumeric" data-validation-regexp="^([^0-9]+)$" data-validation-error-msg="Please enter your first name" />
This is for First Name and Last Name input fields which should support only letters and must also support all languages.
The "letternumeric" option allows numbers too which is not required in Name field. The other option is to use data-validation-regexp="^([a-z,A-Z]+)$" which only allows English alphabets and doesn't support foreign languages.
Please provide a solution for this.