sofittech / workcamp

0 stars 0 forks source link

Register Workcamp #36

Closed maryam-awan closed 4 years ago

maryam-awan commented 4 years ago

A person wants to get his Team on board with workcamp

Alternate Flow

aqibbangash commented 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))
    });
aqibbangash commented 4 years ago

@UsmanTahir101 Check Regex above