@attractor/schemas

1.3.2 • Public • Published

Attractor's schemas

The schemas contained within this package are used all across the Attractor ecosystem to validate config files, requests to APIs and more. It ensures users always send just the right data.

Usage

To get started require the schema you want to use.

const { signUp } = require('@attractor/schemas')

And to run the validation just do:

    if (!await signUp.isValid(data)) {
        /* do some error stuff */
    }

Usage in formik based forms is even more straightforward, just pass it as a schema.

Readme

Keywords

none

Package Sidebar

Install

npm i @attractor/schemas

Weekly Downloads

1

Version

1.3.2

License

MIT

Unpacked Size

6.66 kB

Total Files

11

Last publish

Collaborators

  • inlife