NBAjv - NBAjv

Hierarchy

  • Ajv
    • NBAjv

Constructors

Methods

  • Adds a keyword 'dependentEnumValuesMatch' to ajv, which can be used on objects to configure two keys to have dependent values. This keyword will validate true if the child key has a value that is in the array of dependent values for the parent key.

    This does not enforce that the parent or child keys are in the dependent values object, which should be done via standard object validation.

    Returns void

  • Adds a keyword 'forceConvertToDate' to ajv, which can be used on string fields. This keyword does not perform validation, but will auto convert any strings into a Date object, modifying the schema being validated.

    This imports the date-time validator from ajv-formats, so the behavior is identical to that validator. I don't think there's a better way to do this bar recreating their entire logic ourselves.

    Returns void

  • Adds a keyword 'isNotEmpty' to ajv, which can be used on string fields. This keyword will validate true if the string is not empty, failing if it is. Non-strings are ignored.

    Returns void

Generated using TypeDoc