1

by mistake, on a webform, in the field e-mail we selected fieldtype = textfield instead of email type, no problem to change it if you do not have data, but if you have data, when you delete the field all your data is gone. o So the email field is NOT validate to enter just email addresses. How to validate this field without export and migrate the data?

1 Answer 1

2

After a couple days asking google for the solution, I did this. 1. Install the module https://drupal.org/project/webform_validation this will add another tab on your webform. 2. select "Regular expression, case-insensitive" 3. add the next regex (regular expresion) ^[_a-z0-9-]+(.[_a-z0-9-]+)@[a-z0-9-]+(.[a-z0-9-]+)(.[a-z]{2,3})$ 4. select your email field to validate and add some text to the error message. that's it... from now on all your email will be validate, but the old data must be fixed by hand... the good thing, is you do not need to migrate your data just for fix it..

hopefully this will be helpful to someone... best

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.