IsValid
Validates the incoming value
against the given type
.
If the type is a range, the value is validated against the range. If the type is a pattern, the value is validated against the pattern. If the type is a date, the value is validated against the date format. If the type is a locale date, the value is validated against the locale date format. If the type is a regular expression, the value is validated against the regular expression.
Note we expressly do not support the `eurodate` type, since date formats vary across EU countries. For this, prefer the `LSIsDate( date, locale )` method instead.
Valid Types
array
binary
boolean
component
creditcard
date
email
float
function
guid
integer
numeric
query
range
regex
regular_expression
social_security_number
ssn
string
struct
telephone
time
time
url
usdate
uuid
variablename
xml
zipcode
Method Signature
Arguments
type
string
true
The type to validate the value against
value
any
true
Value to test for validaty on a given type
min
any
false
The minimum value for the range type or a pattern to validate the value against
max
any
false
The maximum value for the range type
pattern
any
false
The pattern to validate the value against
Examples
Related
Last updated
Was this helpful?