0.0.4 • Published 8 months ago
@effective-forms/yup v0.0.4
@effective-forms/yup
See full documentaion
About library
Integrate yup
with core package
Installation
NPM
npm install yup @effective-forms/yup
Yarn
yarn add yup @effective-forms/yup
Usage example
import { createForm } from '@effective-forms/core';
import { yupSchema } from '@effective-forms/yup';
import { object, string } from 'yup';
const userSchema = object({
email: string().required(),
password: string().required(),
});
const form = createForm(
yupSchema({
schema: userSchema,
initialValues: {
email: '',
password: '',
},
})
);