ValidationUtilsIsValidMaskedValue Method |
Validates a value against a mask, if a non-empty/non-null mask is specified.
The mask validation is implemented to correspond to the
Digital Bush jQuery Masked Input Plugin
used client-side when a
TextBox_Mask is specified on a field.
Note that custom mask definitions (supported by the Plugin) are not supported here.
- a - Represents an alpha character (A-Z,a-z).
- 9 - Represents a numeric character (0-9).
- * - Represents an alphanumeric character (A-Z,a-z,0-9).
- ? - Anything listed after '?' within the mask is considered optional user input.
Namespace:
NetQuarry
Assembly:
EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntaxpublic static bool IsValidMaskedValue(
string mask,
string val
)
Public Shared Function IsValidMaskedValue (
mask As String,
val As String
) As Boolean
Parameters
- mask
- Type: SystemString
The mask against which to validate. - val
- Type: SystemString
The value to validate.
Return Value
Type:
BooleanTrue if the value conforms to the mask or the mask is null/empty.
See Also