Provides data for the SftMask.ValidationError event.
Namespace: Softelvdm.SftMaskNET
Assembly: Softelvdm.SftMaskNET
Inheritance
public class ValidationErrorEventArgs : System.EventArgs;
Public Class ValidationErrorEventArgs
Inherits System.EventArgsThis class cannot be instantiated.
![]() | Position | Returns the first position that is not valid, or -1 when no position is at fault (ValidationErrorReasonEnum.Custom). |
![]() | Reason | Returns why the contents are not valid. |
![]() | Validating | Returns whether the error was found while the control was validated (Validating event) rather than by the SftMask.ValidateContents method. |
![]() ![]() ![]() | Empty | Provides a value to use with events that do not have event data. |
![]() ![]() | Equals | Determines whether the specified object is equal to the current object. |
![]() ![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. |
![]() ![]() | GetHashCode | Serves as the default hash function. |
![]() ![]() | GetType | Gets the Type of the current instance. |
![]() ![]() | MemberwiseClone | Creates a shallow copy of the current Object. |
![]() ![]() ![]() | ReferenceEquals | Determines whether the specified Object instances are the same instance. |
![]() ![]() | ToString | Returns a string that represents the current object. |
private void sftMask1_ValueChanged(object sender, EventArgs e) {
DumpValues("sftMask1.ValueChanged (" + (sftMask1.Value.HasValue ? sftMask1.Value.Value.ToString() : "none") + ")", e);
}
private void sftMask1_InputRejected(object sender, InputRejectedEventArgs e) {
DumpValues("sftMask1.InputRejected", e);
}
private void sftMask1_ValidationError(object sender, ValidationErrorEventArgs e) {
DumpValues("sftMask1.ValidationError", e);
}
// Amounts over 10,000 are not accepted.
private void sftMask1_CustomValidation(object sender, CancelEventArgs e) {
e.Cancel = sftMask1.Value.HasValue && sftMask1.Value.Value > 10000;
DumpValues("sftMask1.CustomValidation" + (e.Cancel ? " (over 10,000, refused)" : ""), e);
End If
DumpValues("SftMask1.ValueChanged (" + value + ")", e)
End Sub
Private Sub SftMask1_InputRejected(ByVal sender As Object, ByVal e As InputRejectedEventArgs) Handles SftMask1.InputRejected
DumpValues("SftMask1.InputRejected", e)
End Sub
Private Sub SftMask1_ValidationError(ByVal sender As Object, ByVal e As ValidationErrorEventArgs) Handles SftMask1.ValidationError
DumpValues("SftMask1.ValidationError", e)
End Sub
' Amounts over 10,000 are not accepted.
Private Sub SftMask1_CustomValidation(ByVal sender As Object, ByVal e As CancelEventArgs) Handles SftMask1.CustomValidation
e.Cancel = SftMask1.Value.HasValue AndAlso SftMask1.Value.Value > 10000
DumpValues("SftMask1.CustomValidation" + If(e.Cancel, " (over 10,000, refused)", ""), e)See Also Classes | SftMask/NET 3.0