Closed maryam-awan closed 4 years ago
ValidatorForm.addValidationRule('isPasswordMatch', (value) => {
const { formData } = this.state;
if (value !== formData.password) {
return false;
}
return true;
});
ValidatorForm.addValidationRule('passwordRule', (value) => {
var passwordRegex = new RegExp("^(?=.{6,})");
return (passwordRegex.test(value))
});
ValidatorForm.addValidationRule('nameRule', (value) => {
var fullNameRegex = new RegExp("^[a-zA-Z]+ +[a-zA-Z]+(([',. -][a-zA-Z ])?[a-zA-Z]*)*$");
return (fullNameRegex.test(value))
});
ValidatorForm.addValidationRule('emailRule', (value) => {
var emailRegex = new RegExp('^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$');
return (emailRegex.test(value))
});
ValidatorForm.addValidationRule('orgRule', (value) => {
var passwordRegex = new RegExp("^(?=.{4,})");
return (passwordRegex.test(value))
});
@UsmanTahir101 Check Regex above
A person wants to get his Team on board with workcamp
Alternate Flow