@sustainhawaii/heal-schemas

schemas and validators for healthies collections


Keywords
healthies, shared-library
License
WTFPL
Install
npm install @sustainhawaii/heal-schemas@3.27.4

Documentation

#heal-schemas

Functions

validate(schemaOrPath, val) ⇒ object

Returns true if yup validates, false if error.

isValid(schemaOrPath, val)

Returns true if yup validates, false if error.

validate(schemaOrPath, val) ⇒ object

Returns true if yup validates, false if error.

Kind: global function
Returns: object - Plain object containing error and value keys. If validation passes, value is the cleaned up value. If validation fails, errors is a plain object

Param Type Default Description
schemaOrPath object | string yup schema object or dot-notation path to one in schemas
val * The value to validate against the schema

isValid(schemaOrPath, val)

Returns true if yup validates, false if error.

Kind: global function

Param Type Description
schemaOrPath object | string yup schema object or dot-notation path to one in schemas
val * The value to validate against the schema