Files
talk/client/coral-framework/helpers/validate.js
T
2017-08-28 16:51:41 -06:00

8 lines
274 B
JavaScript

export default {
email: (email) => (/^.+@.+\..+$/.test(email)),
password: (pass) => (/^(?=.{8,}).*$/.test(pass)),
confirmPassword: () => true,
username: (username) => (/^[a-zA-Z0-9_]+$/.test(username)),
organizationName: (org) => (/^[a-zA-Z0-9_ ]+$/).test(org)
};