java.lang.Object
ortus.boxlang.runtime.bifs.BIF
ortus.boxlang.runtime.bifs.global.decision.IsValid

@BoxBIF public class IsValid extends BIF
  • Constructor Details

    • IsValid

      public IsValid()
      Constructor
  • Method Details

    • _invoke

      public Object _invoke(IBoxContext context, ArgumentsScope arguments)
      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
      • hex
      • integer
      • numeric
      • query
      • range
      • regex
      • regular_expression
      • social_security_number
      • ssn
      • string
      • struct
      • telephone
      • time
      • time
      • url
      • usdate
      • uuid
      • variablename
      • xml
      • zipcode
      Specified by:
      _invoke in class BIF
      Parameters:
      context - The context in which the BIF is being invoked.
      arguments - Argument scope for the BIF.
      Returns:
      The result of the invocation
    • castAsStringOrNull

      public String castAsStringOrNull(Object value)
      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.