I need to validate that a field does not contain only numbers. in other words it can have some numbers but must have some letters as well. Can someone help me with the regex to do that? thanks

Comments

dianacastillo’s picture

Someone gave me the answer on drupal stackexhange so I thought I would share it:
2 down vote accept

Here are the steps you'll need to follow:

Go to your webform
Select the "form validation" button.
under the "Add a validation rule" select "Regular expression, case-sensitive"
For the regex, you can use ^\d*$ and check the negate rule box below

OR

Go to your webform
Select the "form validation" button.
under the "Add a validation rule" select "Regular expression, case-sensitive"
For the regex, you can use [^\d]+

dianacastillo’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.