|
|
|
SftMask.ValidationError Event |
Invalid input is detected, based on the Mask property.
Syntax
VB.NET |
Private Sub object_ValidationError(ByVal sender As Object, ByVal e As EventArgumentType) Handles object.ValidationError |
||
VB |
Private Sub object_ValidationError(ByVal Text As String, ByVal Failure As SftMaskFailureConstants, ByVal KeyAscii As Integer, ByVal InvalidPos As Long) |
||
C#.NET |
void object_ValidationError(object sender, EventArgumentType e); |
||
VC++ |
void OnValidationErrorobject(_bstr_t Text, enum SftMaskFailureConstants Failure, short KeyAscii, long InvalidPos); |
||
C |
HRESULT OnValidationErrorobject(BSTR Text, enum SftMaskFailureConstants Failure, short KeyAscii, long InvalidPos); |
||
Delphi |
procedure objectValidationError(Sender: TObject; Text : WideString; Failure : TOleEnum; KeyAscii : Smallint; InvalidPos : Integer); |
object
A SftMask object.
Text
The current contents of the control.
Failure
Indicates the reason why the input is invalid.
Failure |
Value |
Description |
0 |
Reserved for future use. |
|
1 |
The contents are valid, but the contents were rejected by the CustomValidation event. |
|
2 |
The control has lost the input focus. The contents are invalid. |
|
3 |
The Contents.Valid or ValidMsg property is determining the validity of the contents. The contents are invalid. |
|
4 |
The character KeyAscii typed is invalid at position InvalidPos. |
|
5 |
One or more characters could not be deleted at position InvalidPos. |
|
6 |
The contents match the mask, but the date is invalid or incomplete. |
|
7 |
The contents match the mask, but the date is outside the valid range (Calendar.FirstDate, LastDate). |
KeyAscii
The character entered which is invalid. This value is 0 if no character has been entered or no character is associated with the current failure reason.
InvalidPos
The input position where invalid input was detected. This value may be -1 if no input position is associated with the current failure reason.
Comments
The ValidationError event occurs when invalid input is detected, based on the Mask property.
The ValidationError occurs whenever an action results in invalid input.
Once valid input is detected, the CustomValidation event occurs.