cover-img

how to validate data in javascript

schema builder and data validation and parsing for javascript

12 February, 2022

2

2

0

introduction

we build project and websites , sometimes encounter problems that need solve, but what if we come out with problem of how we validate data in correct way, this is major question and what the data structure you want to validate!, like you want validate and email and password you want to add specific rules to keep users Entering emails correctly,but that too tough or you are not expert in validating strings or regex or anythings like that.

how to solve ?

developers like to use validation library to solve there problems and focus in there business, so this point help me to start building volder validation library helping people to describe data in good structure and well design.

what is volder

volder is javascript npm package, it's powerful Object schema validation, it lets you describe your data using a simple and readable schema and transform a value to match the requirements, it has custom error messages, custom types and nested schemas.

let's take an example

in this example we use volder package for user login validation, first thing install volder package npm install --save volder

volder package has

  • Volder constructor to describe and structure your multiple data.
  • SingleVolder function it's used for describe single data.
  • volder support other types like Email or CreditCard.

this code shows you how to describe your data for user validation


see more example: https://github.com/alguerocode/js-volder

how to help me

there a variety of ways to help me for example install volder and use it in your project, contributing to volder repository or just add a ⭐ star ⭐ to volder repository and i will thank you very much.

thank for reading

javascript

github

web development

opensource

2

2

0

javascript

github

web development

opensource

salah alhashmi
Hi, My name is salah alhashmi, full stack web developer I am interested in open source projects and building web apps

More Articles

Showwcase is a professional tech network with over 0 users from over 150 countries. We assist tech professionals in showcasing their unique skills through dedicated profiles and connect them with top global companies for career opportunities.

© Copyright 2024. Showcase Creators Inc. All rights reserved.