Esempio n. 1
0
 private void AddValidations()
 {
     _email.Validations.Add(new IsNotNullOrEmptyRule <string> {
         ValidationMessage = ResponceCode.applicationErrorHandler("EMAIL_REQUIRED")
     });
     _email.Validations.Add(new EmailValidator <string> {
         ValidationMessage = ResponceCode.applicationErrorHandler("EMAIL_VALID")
     });
     _firstName.Validations.Add(new IsNotNullOrEmptyRule <string> {
         ValidationMessage = ResponceCode.applicationErrorHandler("FIRSTNAME_REQUIRED")
     });
     _firstName.Validations.Add(new NameValidator <string> {
         ValidationMessage = ResponceCode.applicationErrorHandler("FIRSTNAME_VALID")
     });
     _lastName.Validations.Add(new IsNotNullOrEmptyRule <string> {
         ValidationMessage = ResponceCode.applicationErrorHandler("LASTNAME_REQUIRED")
     });
     _lastName.Validations.Add(new NameValidator <string> {
         ValidationMessage = ResponceCode.applicationErrorHandler("LASTNAME_VALID")
     });
     _EUSR.Validations.Add(new IsNotNullOrEmptyRule <string> {
         ValidationMessage = ResponceCode.applicationErrorHandler("EUSR_REQUIRED")
     });
     _EUSR.Validations.Add(new EUSRNumericValidator <string> {
         ValidationMessage = ResponceCode.applicationErrorHandler("EUSR_VALID")
     });
     _contactNo.Validations.Add(new ContactNumericValidator <string> {
         ValidationMessage = ResponceCode.applicationErrorHandler("CONTACT_VALID")
     });
 }
Esempio n. 2
0
 public override void Validate()
 {
     base.Validate();
     _email.Validate();
     _firstName.Validate();
     _lastName.Validate();
     if (_Roles != null)
     {
         RoleMessage = null;
         if (_Roles.RoleName == Engineer)
         {
             _EUSR.Validate();
         }
         else
         {
             _EUSR.IsValid = true;
         }
     }
     else
     {
         RoleMessage = ResponceCode.applicationErrorHandler("ROLE_REQUIRED");
     }
     Message = (IsAccept == false ? ResponceCode.applicationErrorHandler("ACEEPTSTERMS_REQUIRED") : "");
     _contactNo.Validate();
     this.SetValid();
 }
Esempio n. 3
0
 private void AddValidations()
 {
     _email.Validations.Add(new IsNotNullOrEmptyRule <string> {
         ValidationMessage = ResponceCode.applicationErrorHandler("EMAIL_REQUIRED")
     });
     _email.Validations.Add(new EmailValidator <string> {
         ValidationMessage = ResponceCode.applicationErrorHandler("EMAIL_VALID")
     });
 }
Esempio n. 4
0
 private void AddValidations()
 {
     _userName.Validations.Add(new IsNotNullOrEmptyRule <string> {
         ValidationMessage = ResponceCode.applicationErrorHandler("EMAIL_REQUIRED")
     });
     _userName.Validations.Add(new EmailValidator <string> {
         ValidationMessage = ResponceCode.applicationErrorHandler("EMAIL_VALID")
     });
     _password.Validations.Add(new IsNotNullOrEmptyRule <string> {
         ValidationMessage = ResponceCode.applicationErrorHandler("PASSWORD_REQUIRED")
     });
 }
Esempio n. 5
0
 public override void Validate()
 {
     base.Validate();
     if (_Roles != null)
     {
         Message = "";
     }
     else
     {
         Message = ResponceCode.applicationErrorHandler("ROLE_REQUIRED");
     }
     this.SetValid();
 }
Esempio n. 6
0
 private void AddValidations()
 {
     _oldPassword.Validations.Add(new IsNotNullOrEmptyRule <string> {
         ValidationMessage = ResponceCode.applicationErrorHandler("OLDPASSWORD_REQUIRED")
     });
     _password.Validations.Add(new IsNotNullOrEmptyRule <string> {
         ValidationMessage = ResponceCode.applicationErrorHandler("NEWPASSWORD_REQUIRED")
     });
     _password.Validations.Add(new PasswordValidator <string> {
         ValidationMessage = ResponceCode.applicationErrorHandler("PASSWORD_VALID")
     });
     _confirmPassword.Validations.Add(new IsNotNullOrEmptyRule <string> {
         ValidationMessage = ResponceCode.applicationErrorHandler("CONFIRMPASSWORD_REQUIRED")
     });
 }
Esempio n. 7
0
 private void AddValidations()
 {
     _otpCode.Validations.Add(new IsNotNullOrEmptyRule <string> {
         ValidationMessage = ResponceCode.applicationErrorHandler("OTP_REQUIRED")
     });
     _password.Validations.Add(new IsNotNullOrEmptyRule <string> {
         ValidationMessage = ResponceCode.applicationErrorHandler("PASSWORD_REQUIRED")
     });
     _password.Validations.Add(new PasswordValidator <string> {
         ValidationMessage = ResponceCode.applicationErrorHandler("PASSWORD_VALID")
     });
     _confirmPassword.Validations.Add(new PasswordValidator <string> {
         ValidationMessage = ResponceCode.applicationErrorHandler("CONFIRMPASSWORD_REQUIRED")
     });
     //   _confirmPassword.Validations.Add(new PasswordValidator<string> { ValidationMessage = "Confirm Password is not matched." });
 }
Esempio n. 8
0
 public override void Validate()
 {
     base.Validate();
     _otpCode.Validate();
     _password.Validate();
     if (_confirmPassword.Validate())
     {
         if (_password.Value != _confirmPassword.Value)
         {
             ConfirmPassword.Errors.Add(ResponceCode.applicationErrorHandler("CONFIRMPASSWORD_VALID"));
         }
         else
         {
             ConfirmPassword.Errors.Add("");
         }
     }
     this.SetValid();
 }