예제 #1
0
 private void txtAccountName_Validating(object sender, CancelEventArgs e)
 {
     if (!ValidateInput.ValidNoneSpecialChar(txtAccountName.Text, out errMsg))
     {
         CancelValidatedEvent(grpAccountName, lblAccountNameError, e);
     }
 }
예제 #2
0
 private void txtNewPassword_Validating(object sender, CancelEventArgs e)
 {
     if (!ValidateInput.ValidNoneSpecialChar(txtNewPassword.Text, out errMsg))
     {
         CancelValidatedEvent(grpNewPassword, lblNewPasswordError, e);
     }
 }
예제 #3
0
 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);
     }
 }
예제 #4
0
 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);
     }
 }