Skip to content

Conversation

mattheworiordan
Copy link
Contributor

The following email address matt@test.com. is validated by your regex as valid. I have modified it so that an email address cannot end with a .

@gmile
Copy link

gmile commented Jul 9, 2011

@mattheworiordan can you provide a test case for this one?

@gmile
Copy link

gmile commented Jul 9, 2011

Also, this seems to be a duplicate of #123

@mattheworiordan
Copy link
Contributor Author

His fix seems to be a very strange fix, it has * at the end instead of nothing. Not sure that fix is right.

When you say can I provide a test case, can you be more explicit. Do I need to write a unit test or something like that, or do you want me to simply provide you with an example?

@gmile
Copy link

gmile commented Jul 12, 2011

A simple unit test would be fine. Test validating matt@test.com. string, for example

@mattheworiordan
Copy link
Contributor Author

Hi gmile

I have created a test and pushed that. Hope that is what you need.

Matt

@jzaefferer
Copy link
Collaborator

Patch looks good. Asked Scott, who wrote that regex in the first place, to take a look, too.

@gmile
Copy link

gmile commented Aug 9, 2011

@jzaefferer, can we use an ultimate RFC http://www.ex-parrot.com/pdw/Mail-RFC822-Address.html variant here?

@jzaefferer
Copy link
Collaborator

I'm going to land this patch. The dot at the end is valid by the RFC, but really another exception we need to make.

@mattheworiordan
Copy link
Contributor Author

Cool, well the . on the end is definitely not valid for an email address, so think this will fix an immediate problem.

@jzaefferer
Copy link
Collaborator

@mattheworiordan it is valid by the RFC definition, according to Scott. He wrote the compiler for the regex. Not that it matters that much, as we're making other exceptions already.

@jzaefferer
Copy link
Collaborator

Thanks, cherry-picked the commit to update the commit message and changelog. Note to self: Switch to script that exports changelog from commit log.

mlynch pushed a commit to mlynch/jquery-validation that referenced this pull request Mar 28, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants