@valivali/yup
v1.0.0
Published
ValiVali Resolver for yup.
Downloads
3
Maintainers
Readme
@valivali/yup
ValiVali Resolver for yup.
🚀 Installation
$ npm install @valivali/core @valivali/yup yup
👏 Getting Started
The following is a simple usage example.
import { valivali } from '@valivali/core';
import { yupResolver } from '@valivali/yup';
// It is also possible to import with the following aliases.
// import { resolver } from '@valivali/yup';
import * as yup from 'yup';
const schema = yup.object({
id: yup.string().required(),
name: yup.string().required(),
});
const value = {
id: 'id',
name: 'name',
};
const validatedValue = valivali(yupResolver(schema), value);
🤝 Contributing
Contributions, issues and feature requests are welcome.
Feel free to check issues page if you want to contribute.
📝 License
Copyright © 2020 @Karibash.
This project is MIT
licensed.