ow
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Predicate<Date>
    • DatePredicate

Implements

  • BasePredicate<Date>

Index

Accessors

Methods

Accessors

not

not:

Invert the following validators.

Methods

after

  • after(date: Date): this
  • Test a date to be before another date.

    Parameters

    • date: Date

      Minimum value.

    Returns this

before

  • before(date: Date): this
  • Test a date to be before another date.

    Parameters

    • date: Date

      Maximum value.

    Returns this

is

  • is(fn: function): this
  • Test if the value matches a custom validation function. The validation function should return true if the value passes the function. If the function either returns false or a string, the function fails and the string will be used as error message.

    Parameters

    • fn: function

      Validation function.

        • (value: Date): boolean | string
        • Parameters

          • value: Date

          Returns boolean | string

    Returns this