Class IsValid
java.lang.Object
ortus.boxlang.runtime.bifs.BIF
ortus.boxlang.runtime.bifs.global.decision.IsValid
-
Field Summary
Fields inherited from class ortus.boxlang.runtime.bifs.BIF
__functionName, __isMemberExecution, asyncService, cacheService, componentService, declaredArguments, functionService, interceptorService, logger, moduleService, runtime, schedulerService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription_invoke
(IBoxContext context, ArgumentsScope arguments) Validates the incomingvalue
against the giventype
.castAsStringOrNull
(Object value) Helper method to cast the value to a string or null if the value is null.Methods inherited from class ortus.boxlang.runtime.bifs.BIF
announce, getDeclaredArguments, invoke
-
Constructor Details
-
IsValid
public IsValid()Constructor
-
-
Method Details
-
_invoke
Validates the incomingvalue
against the giventype
. 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
- float
- function
- guid
- hex
- integer
- numeric
- query
- range
- regex
- regular_expression
- social_security_number
- ssn
- string
- struct
- telephone
- time
- time
- url
- usdate
- uuid
- variablename
- xml
- zipcode
-
castAsStringOrNull
Helper method to cast the value to a string or null if the value is null.- Parameters:
value
- The value to cast to a string or null.- Returns:
- The value as a string or null if the value is null.
-