Requires emails to contain at least 1 character before and after the @ sign

Этот коммит содержится в:
hmhealey
2016-02-23 17:14:49 -05:00
родитель 52767d9dcd
Коммит 89e1b91020

Просмотреть файл

@@ -19,7 +19,7 @@ import {FormattedTime} from 'mm-intl';
export function isEmail(email) { export function isEmail(email) {
// writing a regex to match all valid email addresses is really, really hard (see http://stackoverflow.com/a/201378) // writing a regex to match all valid email addresses is really, really hard (see http://stackoverflow.com/a/201378)
// so we just do a simple check and rely on a verification email to tell if it's a real address // so we just do a simple check and rely on a verification email to tell if it's a real address
return email.indexOf('@') !== -1; return (/^.+@.+$/).test(email);
} }
export function cleanUpUrlable(input) { export function cleanUpUrlable(input) {