mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-02-17 08:50:58 -05:00
Add validateEmail to forms
This commit is contained in:
parent
1c4a84dee6
commit
bd20536046
1 changed files with 3 additions and 0 deletions
|
@ -99,3 +99,6 @@ module.exports.updateSelects = (el) ->
|
|||
value = $(select).attr('value')
|
||||
$(select).val(value)
|
||||
|
||||
module.exports.validateEmail = (email) ->
|
||||
filter = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,63}$/i # https://news.ycombinator.com/item?id=5763990
|
||||
return filter.test(email)
|
||||
|
|
Loading…
Reference in a new issue