private void txtNewContractorEmailA_Validating(object sender, CancelEventArgs e) { RegularExpressionHelper helper = new RegularExpressionHelper(); // Email is required if (((txtNewContractorEmailA.Text).Length > 50) || !helper.IsValidEmail(txtNewContractorEmailA.Text)) { errorProvider20.SetError(txtNewContractorEmailA, "Invalid Email"); e.Cancel = true; return; } // Email is Valid errorProvider20.SetError(txtNewContractorEmailA, ""); }
private void txtNewContractorDescription_Validating(object sender, CancelEventArgs e) { RegularExpressionHelper helper = new RegularExpressionHelper(); // Description is required if (((txtNewContractorDescription.Text).Length > 50) || !helper.IsAlphaNumericWithUnderscore(txtNewContractorDescription.Text)) { errorProvider30.SetError(txtNewContractorDescription, "Invalid Description Format"); e.Cancel = true; return; } // Description is Valid errorProvider30.SetError(txtNewContractorDescription, ""); }
private void txtNewClientPosition_Validating(object sender, CancelEventArgs e) { RegularExpressionHelper helper = new RegularExpressionHelper(); // Position is required if (((txtNewClientPosition.Text).Length > 50) || !RegularExpressionHelper.IsAlpha(txtNewClientPosition.Text)) { errorProvider8.SetError(txtNewClientPosition, "Incorrect Position Format"); e.Cancel = true; return; } // Position is Valid errorProvider8.SetError(txtNewClientPosition, ""); }
private void txtNewClientPhoneW_Validating(object sender, CancelEventArgs e) { RegularExpressionHelper helper = new RegularExpressionHelper(); // Phone is required if (((txtNewClientPhoneW.Text).Length > 15) || !helper.IsPhoneFormat(txtNewClientPhoneW.Text)) { errorProvider12.SetError(txtNewClientPhoneW, "Incorrect Phone Format"); e.Cancel = true; return; } // Phone is Valid errorProvider12.SetError(txtNewClientPhoneW, ""); }
private void txtNewCoordinatorPhoneM_Validating(object sender, CancelEventArgs e) { RegularExpressionHelper helper = new RegularExpressionHelper(); // Phone is required if (((txtNewCoordinatorPhoneM.Text).Length > 15) || !helper.IsMobileFormat(txtNewCoordinatorPhoneM.Text)) { errorProvider26.SetError(txtNewCoordinatorPhoneM, "Incorrect Mobile Format"); e.Cancel = true; return; } // Phone is Valid errorProvider26.SetError(txtNewCoordinatorPhoneM, ""); }
private void txtNewContractorFax_Validating(object sender, CancelEventArgs e) { RegularExpressionHelper helper = new RegularExpressionHelper(); // Fax is required if (((txtNewContractorFax.Text).Length > 15) || !helper.IsPhoneFormat(txtNewContractorFax.Text)) { errorProvider21.SetError(txtNewContractorFax, "Incorrect Fax Format"); e.Cancel = true; return; } // Fax is Valid errorProvider21.SetError(txtNewContractorFax, ""); }