public JarsUsersForm() { InitializeComponent(); CustomEmailValidationRule emRule = new CustomEmailValidationRule { ErrorText = "please provide a valid email", ErrorType = ErrorType.Default }; dxValidator.SetValidationRule(ctrl_txteMail, emRule); }
public LoginRegisterForm(IJsonServiceClient authClient) { //_SSEventClient = sSEventClient; //check auth here?? InitializeComponent(); tabLogin.PageVisible = false; tabRegister.PageVisible = false; tabAutoLogin.PageVisible = true; tabResetPassword.PageVisible = false; ctrl_LayoutUserEmail.ContentVisible = false; ctrl_LayoutPassword.ContentVisible = false; ctrl_LayoutSwithToResetPassword.ContentVisible = false; tabCtrlLoginRegister.SelectedTabPage = tabAutoLogin; tabCtrlLoginRegister.ShowTabHeader = DevExpress.Utils.DefaultBoolean.False; DialogResult = DialogResult.Abort; Text = "JaRS - Sign in"; _AppSettings = new AppSettings(); _Authenticator = new Authenticator(authClient); cbEditRememberLogin.Checked = _Authenticator.LastRememberMe; //add custom validators CustomEmailValidationRule emRule = new CustomEmailValidationRule { ErrorText = "please provide a valid email", ErrorType = ErrorType.Default }; CustomPasswordValidationRule pwRule = new CustomPasswordValidationRule { ErrorText = "Please make sure the password meets the required criteria.", ErrorType = ErrorType.Default }; dxRegisterValidationProvider.SetValidationRule(txtRegisterEmail, emRule); dxRegisterValidationProvider.SetValidationRule(txtRegisterPassword1, pwRule); }