Add validateEmail to forms

This commit is contained in:
Scott Erickson 2016-02-25 15:28:04 -08:00
parent 1c4a84dee6
commit bd20536046

View file

@ -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)