El Validator is a JSON Object validator and sanitizer. It's a great little tool for validating user input and sanitizing. Define a schema and validate it against the user input. It's inspired from the familiar Mongoose schema format with a few more features.
No reviews yetBe the first to leave a review for El Validator
Maker
Hey Hunters 👋!
This year I'll be building 10 products/businesses in public and this is project #5!
While building the backend of project #4 (a travel social network) that is not launched yet, I've came to the step where I needed to validate and sanitize user input.
I basically get a JSON object with various fields, some of them are strings, numbers, sub-fields... And validating that stuff is tedious and boring!
It's often the step that is the most bug-prone (i.e. you check that the length of a field is > 5 but didn't check that the field is a string to start with).
And it's the part where you need to be the most careful since user-input is the starting point of all security flaws.
That's where El Validator comes in!
You specify a schema (similar to Mongoose schemas) and then validate the user input.
It's very flexible and saves a lot of time!
- It's 100% Open-Source
- 0 dependencies
- Easy to use
- Lightweight (8.7Kb minified)
I'm open to feedback to improve the tool. If you want to follow my build-in-public challenge, follow me on twitter @ybouane, I post daily updates.