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.
array
binary
boolean
component
creditcard
Use the isValid function with integer as the type.
Result: true
Use the isValid function with email as the type.
Result: true
date
float
function
guid
hex
integer
numeric
number
query
range
regex
regular_expression
social_security_number
ssn
string
struct
telephone
time
time
url
usdate
uuid
variablename
xml
zipcode
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
type
string
true
The type to validate the value against
value
any
true
Value to test for validaty on a given type
min
IsValid(type=[string], value=[any], min=[any], max=[any], pattern=[any])isValid( "integer", 235 );
isValid( "email", "[email protected]" );
<bx:set anArray = [] >
<bx:set boolean = true >
<bx:set email = "[email protected]" >
<bx:set guid = createGUID() >
<bx:set integer = 15 >
<bx:set string = "Hello World" >
<bx:set http_url = "http://www.test.com" >
<bx:set uuid = createUUID() >
<bx:output>
Array: #isValid( "array", anArray )#<br>
Boolean: #isValid( "boolean", boolean )#<br>
Email: #isValid( "email", email )#<br>
GUID: #isValid( "guid", guid )#<br>
Integer: #isValid( "integer", integer )#<br>
String: #isValid( "string", string )#<br>
URL: #isValid( "url", http_url )#<br>
UUID: #isValid( "uuid", uuid )#
</bx:output>