mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Client-side email validation should allow capital letters
This commit is contained in:
@@ -46,7 +46,7 @@ Discourse.Utilities =
|
||||
|
||||
emailValid: (email)->
|
||||
# see: http://stackoverflow.com/questions/46155/validate-email-address-in-javascript
|
||||
re = /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/
|
||||
re = /^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$/
|
||||
re.test(email)
|
||||
|
||||
selectedText: ->
|
||||
|
||||
Reference in New Issue
Block a user