Socket
Socket
Sign inDemoInstall

@sudheer0071/validations

Package Overview
Dependencies
1
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @sudheer0071/validations

A collections of zod schemas for validating input data in js/ts applications it contains the validations for following schemas:


Version published
Weekly downloads
3
decreased by-57.14%
Maintainers
1
Install size
667 kB
Created
Weekly downloads
 

Readme

Source

Zod inference and validation package

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.

Installation

npm install @sudheer0071/validations

Usage

By using signupInput in frontend and singupSchema in backend

import { signupSchema, signupInput } from '@sudheer0071/validations';

const data: signupInput = {
  email: 'example@example.com',
  password: 'password',
  name: 'John Doe'
};

const result = signupSchema.parse(data);

By using signinInput in frontend and singinSchema in backend

import { signupSchema, signupInput } from '@sudheer0071/validations';

const data: signupInput = {
  email: 'example@example.com',
  password: 'password',
  name: 'John Doe'
};

const result = signupSchema.parse(data);

By using createblogInput in frontend and createBlogSchema in backend

import { signupSchema, signupInput } from '@sudheer0071/validations';

const data: signupInput = {
  email: 'example@example.com',
  password: 'password',
  name: 'John Doe'
};

const result = signupSchema.parse(data);

By using updateblogInput in frontend and updateBlogSchema in backend

import { signupSchema, signupInput } from '@sudheer0071/validations';

const data: signupInput = {
  email: 'example@example.com',
  password: 'password',
  name: 'John Doe'
};

const result = signupSchema.parse(data);

License

This package is licensed under the MIT License. See the LICENSE file for details.

My github

FAQs

Last updated on 15 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc