private void txtAccountName_Validating(object sender, CancelEventArgs e) { if (!ValidateInput.ValidNoneSpecialChar(txtAccountName.Text, out errMsg)) { CancelValidatedEvent(grpAccountName, lblAccountNameError, e); } }
private void txtNewPassword_Validating(object sender, CancelEventArgs e) { if (!ValidateInput.ValidNoneSpecialChar(txtNewPassword.Text, out errMsg)) { CancelValidatedEvent(grpNewPassword, lblNewPasswordError, e); } }
private void txtPassword_Validating(object sender, CancelEventArgs e) { if (!ValidateInput.ValidNoneSpecialChar(txtPassword.Text, out errMsg)) { CancelValidatedEvent(grpPassword, lblPasswordError, e); } if (txtPassword.Text.Any(c => c > 255)) { errMsg = "Mật khẩu chứa kí tự tiếng Việt.\nHãy tắt bộ gõ tiếng Việt và nhập lại."; CancelValidatedEvent(grpPassword, lblPasswordError, e); } }
private void txtConfirmPassword_Validating(object sender, CancelEventArgs e) { if (!ValidateInput.ValidNoneSpecialChar(txtConfirmPassword.Text, out errMsg)) { CancelValidatedEvent(grpConfirmPassword, lblConfirmPasswordError, e); } if (txtNewPassword.Text != txtConfirmPassword.Text) { errMsg = "Mật khẩu xác nhận không trùng khớp"; CancelValidatedEvent(grpConfirmPassword, lblConfirmPasswordError, e); } }