Skip to main content
Nintex Community Menu Bar
Answer

Email validation

  • September 25, 2017
  • 14 replies
  • 635 views

Forum|alt.badge.img+4

I wanted to validate email addresses and I found a solution in this forum, however, I used the same solution on two forms.  The first form works and the second form says invalid email even though I am using the correct format.

 

This is what I did.  On the email field, double-click, then Control Settings - Single Line Textbox, click validation, then clicked yes for use regular expression, then in the regular expression box, I have the following.  [a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,4} 

 

I also attached screenshots.  I don't understand why it works on one form and doesn't in another.  Is there something I am missing?  Thank you.

Best answer by fhunth

Great!, please mark the answer as correct

14 replies

Forum|alt.badge.img+16
  • September 25, 2017

What is the email address you are testing?

Try copying/pasting from the expresstion that works, but paste it on notepad and then copy it again.


Forum|alt.badge.img+4
  • Author
  • September 25, 2017

Thank you.  It works.


Forum|alt.badge.img+16
  • Answer
  • September 26, 2017

Great!, please mark the answer as correct


Forum|alt.badge.img+3
  • June 22, 2018

Hi Fernando,

I've tried more than ten times but it's not working, I copy and paste on notepad, type the exertion, :-(

do you have any suggestion for me?

Thanks


Forum|alt.badge.img+12
  • Rookie
  • September 25, 2019

@bf_parvaz ...use below expression:

 

^[A-Za-z0-9](([_.-]?[a-zA-Z0-9]+)*)@([A-Za-z0-9]+)(([.-]?[a-zA-Z0-9]+)*).([A-Za-z]{2,})$


Forum|alt.badge.img+3
  • September 26, 2019
Thanks mate!

SherryH
  • November 27, 2019

Hi Kunalpatel, Would you please advise how I should read the expression?  I need to create input mask for my other fields like phone number , website, etc

I tried

 ###.###.####

^[0-9]{3}.[0-9]{3}.[0-9]{4}$

Didn't work! :(

@kunalpatel


Forum|alt.badge.img+12
  • Rookie
  • November 27, 2019

@SherryH .....I usually refer this...RegEx Library.....and use Find Expression search


SimonMuntz
Nintex Employee
Forum|alt.badge.img+23
  • Nintex Employee
  • November 29, 2019

@SherryH Try just:

[0-9]{3}.[0-9]{3}.[0-9]{4}

and it will work.


SherryH
  • December 2, 2019

Thank you very much ! That's what I was looking for!


Forum|alt.badge.img
  • February 28, 2020

hi 

I have a problem trying to set a regular expression in text box field, What I'm trying to do is validate the format like this XXXX-XXXX-XXXX, and I'm using this Regex  [A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}  but seems to be does not working any of my tries 

 

any help will be very wellcome 

 


SimonMuntz
Nintex Employee
Forum|alt.badge.img+23
  • Nintex Employee
  • March 1, 2020
Hi.

Instead of [A-Z0-9]{4}, use lower case [a-z0-9]{4}

SherryH
  • April 2, 2020
Thank you SimonMuntz! I appreciate it.

tulasi7373
  • August 14, 2020

Nintex Email Validation Control Settings - Single Line Textbox --> Validation --> Use a regular expression : Yes

Regular Expression :     .+@.+(.).+ 

Regular expression error message : Enter a valid email address

Code .+@.+(.).+