Files
talk/client/coral-framework/helpers/validate.js
T
Belen Curcio 16f93a0a19 Validaiton
2017-02-06 22:41:21 -03:00

8 lines
324 B
JavaScript

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