You are viewing limited content. For full access, please sign in.

Question

Question

email validation forms

asked on August 24, 2017

I have a user that is trying to use an ampersand in an email - example A&W@yahoo.com - and it is failing verification.  From what I read (although discouraged) this is a valid email address although it will not pass forms logic.  Is the & in fact the cause of the failing validation issue?

0 0

Answer

SELECTED ANSWER
replied on August 24, 2017 Show version history

Hi Terri,

Yes, symbols such as &, !, $, #, ^, *, etc. will cause Forms to throw that error message. 

If your user is interested in allowing people to submit emails with an ampersand, they will need to use a single line field. Making sure it's an email address (at least 99.9% of the time) would take some interesting regular expression that doesn't quite fit in the 'Regular expression for validation' field:

(?:[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])

 

0 0

Replies

replied on August 24, 2017

0 0
SELECTED ANSWER
replied on August 24, 2017 Show version history

Hi Terri,

Yes, symbols such as &, !, $, #, ^, *, etc. will cause Forms to throw that error message. 

If your user is interested in allowing people to submit emails with an ampersand, they will need to use a single line field. Making sure it's an email address (at least 99.9% of the time) would take some interesting regular expression that doesn't quite fit in the 'Regular expression for validation' field:

(?:[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])

 

0 0
replied on September 8, 2021

Hi - I am trying to fit this regular expression into the Regular Expression validation parameter field for the Single Line field. However, the field is too small to fit the whole regular expression field. Is there any other alternative way I can apply it?

 

Here is the regular expression: 

(?:[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])

 

Thank you.

 

Wissam

2021-09-08 11_36_06-Window.png
0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.