DEV Community

Cover image for The easy and lightweight way to validate data in React Components & Node.js

The easy and lightweight way to validate data in React Components & Node.js

Malkhazi Dartsmelidze on May 19, 2020

👉 Click here to see new update about this package Hi, I always wanted to write an article on dev.to and this is my first post about my very first ...
Collapse
 
maxgrafx profile image
maxgrafx

does it play nice with Formik?

Collapse
 
malkhazidartsmelidze profile image
Malkhazi Dartsmelidze

I am going to integrate it with 3rd party libraries and Formik is one of them. I'll let you know when it's ready!

Collapse
 
maxgrafx profile image
maxgrafx

would love to see that, i'm using Yup (which is great) but is about 31Kb's when bundled for production

Collapse
 
dullin profile image
Hugo Leblanc

Question about the design:

Why did you use a single string with separators to create your validation scheme? Is it taken from another format? Is it easier to parse than an object instead?

Collapse
 
malkhazidartsmelidze profile image
Malkhazi Dartsmelidze

Hello again, Hugo. I released new update, which made possible to change design. You can look details here: dev.to/malkhazidartsmelidze/simple...

Collapse
 
malkhazidartsmelidze profile image
Malkhazi Dartsmelidze
Collapse
 
malkhazidartsmelidze profile image
Malkhazi Dartsmelidze

Nice note, Hugo. You got the point. Laravel Framework has similar validation rules, also I think this design makes package more compact and easy to use

Collapse
 
maxgrafx profile image
maxgrafx • Edited

looks promising, but the URL that NPM is showing does not exist. looks like a typo, max-validaror is the correct url instead of max-validator that NPM shows

Collapse
 
maxgrafx profile image
maxgrafx

ah you fixed it, lightning fast ;)

Collapse
 
malkhazidartsmelidze profile image
Malkhazi Dartsmelidze • Edited

Thank you for note. I edited it and it works now. This is correct url

Collapse
 
crimsonmed profile image
Médéric Burlet

Reminds me of validate.js but in a more compact but less flexible.

Good job on the nice library for compact quick validation

validatejs.org/

Collapse
 
malkhazidartsmelidze profile image
Malkhazi Dartsmelidze

Thank you for feedback. I'll try to make add more flexibility to it while maintaining compactness

Collapse
 
alphavader profile image
KB

Very interesting, thanks

Collapse
 
malkhazidartsmelidze profile image
Malkhazi Dartsmelidze

Thank you. I am glad you like it