Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

added missing backslashes to regexp in validator_base_email #468

Merged
merged 1 commit into from

3 participants

@wielonib

Added missing backslashes in regexp in validator_base_email.

It fixes validation of e-mail addresses with dash symbol after dot.
For example john.smit^h@example.com didn't pass validation, but joh^n.smith@example.com did.

@arjan
Owner

Wow

@arjan
Owner

Thanks! I'll merge it, looks good.

Next time please prefix your commit message, like stated here:
http://zotonic.com/docs/dev/codestyle.html#writing-commit-messages

@arjan arjan merged commit bfbe742 into from
@wielonib

Oh, ok, I missed the doc.

@kaos
Owner

No worries. Those docs have not been released as official just yet.
You would only know about them if you pay close attention to our mailinglists (or chat room: xmpp:zotonic@conference.zotonic.com?join )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 modules/mod_base/validators/validator_base_email.erl
View
4 modules/mod_base/validators/validator_base_email.erl
@@ -43,8 +43,8 @@ validate(email, Id, Value, _Args, Context) ->
re() ->
"(
(\"[^\"\\f\\n\\r\\t\\v\\b]+\")
- | ([\\w\\!\\#\\$\\%\\&\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}]+
- (\\.[\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\^\`\\|\\{\\}]+)*
+ | ([\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}]+
+ (\\.[\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}]+)*
)
)
@
Something went wrong with that request. Please try again.