A collections of zod schemas for validating input data in js/ts applications it contains the validations for following schemas:
1.signupSchema
2.signinSchema
3.createBlogSchema
4.updateBlogSchema
This package is created by using the zod infer in typerscript, which allows us to valid with same varaibles/constants in frontend and backend.
npm install @sudheer0071/validations
import { signupSchema, signupInput } from '@sudheer0071/validations';
const data: signupInput = {
email: 'example@example.com',
password: 'password',
name: 'John Doe'
};
const result = signupSchema.parse(data);
import { signupSchema, signupInput } from '@sudheer0071/validations';
const data: signupInput = {
email: 'example@example.com',
password: 'password',
name: 'John Doe'
};
const result = signupSchema.parse(data);
import { signupSchema, signupInput } from '@sudheer0071/validations';
const data: signupInput = {
email: 'example@example.com',
password: 'password',
name: 'John Doe'
};
const result = signupSchema.parse(data);
import { signupSchema, signupInput } from '@sudheer0071/validations';
const data: signupInput = {
email: 'example@example.com',
password: 'password',
name: 'John Doe'
};
const result = signupSchema.parse(data);
This package is licensed under the MIT License. See the LICENSE
file for details.