From bafe044bd564398e0cb342752caee6673c6a46c3 Mon Sep 17 00:00:00 2001 From: bshardi Date: Thu, 27 Feb 2014 10:42:58 -0500 Subject: [PATCH] Adding isStringEmail method to AccountsEntry --- client/entry.coffee | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/entry.coffee b/client/entry.coffee index fa7785db..89f715d8 100644 --- a/client/entry.coffee +++ b/client/entry.coffee @@ -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)