Scenario, if a user has a PersonGUID from an external system, I want them to enter in the box, and I want to make sure they enter it in the correct format.
If they don't have that information, and are tabbing through the form, I want them to be able to proceed to the next box.
Is there an event handler that I need to add to my form to make this happen?
Or by it's very nature, is data required to be entered if the validation event is applied?
Code: Select all
$maskedtextboxPersonGUID_Validating = [System.ComponentModel.CancelEventHandler]{
#Event Argument: $_ = [System.ComponentModel.CancelEventArgs]
if (-not $maskedtextboxPersonGUID.MaskFull)
{
$_.Cancel = $true
$errorprovider1.SetError($maskedtextboxPersonGUID, "Numbers and Letters (8-4-4-4-12)");
} #end if (-not $maskedtextboxPersonGUID.MaskFull)
} #end $maskedtextboxPersonGUID_Validating