Skip to content

Commit

Permalink
Adding isStringEmail method to AccountsEntry
Browse files Browse the repository at this point in the history
  • Loading branch information
bshardi committed Feb 27, 2014
1 parent 398065d commit bafe044
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions client/entry.coffee
Expand Up @@ -7,6 +7,9 @@ AccountsEntry =
emailInsensitive: true
usernameInsensitive: false

isStringEmail: (email) ->
emailPattern = /^([\w.-]+)@([\w.-]+)\.([a-zA-Z.]{2,6})$/i
if email.match emailPattern then true else false

config: (appConfig) ->
@settings = _.extend(@settings, appConfig)
Expand Down

0 comments on commit bafe044

Please sign in to comment.