APIs

Show:

static rule for regex pattern checking

Item Index

Methods

Methods

method

(
  • value
  • [attr]
  • [params]
)
Boolean

returns true if the value parameter is a string and matches any of the regex strings found in params.patterns. false otherwise

pat_emergency_contact_phone: {
                        errorMessage: 'Enter a valid Phone #'
                        patterns: [
                            /^\d{10}(.{1,10})?$/
                        ]
                    }

Parameters:

  • value Object

    Value to check

  • [attr] String optional

    Attribute key

  • [params] Object optional

    assortment of parameters

    • [patterns] Array optional

      array of regex strings

Returns:

Boolean:

If the function passes