Parsley is a JavaScript library, that can work with both jQuery or Zepto, designed to validate forms easily. It is built with UX concerns in mind and tries to simplify details for the user.

Is this what you're looking for?

Answer from Diego Cardozo on Stack Overflow
๐ŸŒ
Stackshare
stackshare.io โ€บ npm-validate-js โ€บ alternatives
validate.js Alternatives
Explore the pros & cons of validate.js and its alternatives. Learn about popular competitors like jQuery, React, and AngularJS
๐ŸŒ
npm Trends
npmtrends.com โ€บ joi-vs-validate.js-vs-validator
joi vs validate.js vs validator | npm trends
Comparing trends for joi 18.0.1 which has 13,592,128 weekly downloads and 21,155 GitHub stars vs. validate.js 0.13.1 which has 561,950 weekly downloads and 2,616 GitHub stars vs. validator 13.15.15 which has 15,239,971 weekly downloads and 23,579 GitHub stars.
๐ŸŒ
GitHub
github.com โ€บ wfp โ€บ ui โ€บ issues โ€บ 81
Replace jQuery Validation Plugin with a dependency-free alternative ยท Issue #81 ยท wfp/designsystem
March 17, 2016 - According to the section on Form Validation: By default, WFP recommends a jQuery Validation Plugin, which is well documented and actively supported. Please, refer to its documentation for ways to implement inline validation for your form...
Author ย  andrewholgate
Top answer
1 of 2
11

They are used for different scenarios:

  • validator is a library to validate any kind of object and it's not associated with any framework.

  • express-validator uses validator library to validate expressjs routes. Basically you can validate express routes out of the box using validator lib.

In my honest opinion you can easily create your own validator middleware. Specially if you are new to Node.js it will help you to understand how middlewares work. If you are not interested on that and you have an express application feel free to use express-validator

Also I really recommend JOI as a validator lib https://github.com/hapijs/joi it's simple and it works well.

Here is an example of a middleware (I have not tested)

const Joi = require('joi')
module.exports = function validate(joiSchema) {
  return async (req, res, next) => {
    const result = Joi.validate(req.body, joiSchema, {
      allowUnknown: true,
      abortEarly: false
    })

    if (result.error) {
      throw new result.error
    }

    await next()
  }
}

  // express route
  router.post(
    '/create',
    validateMiddleware({
      body: {
        body: { firstName: Joi.string(), lastName: Joi.string() }
      }
    }),
    (req, res, next) => {
    // your logic
   })
2 of 2
0

Express-validator is used as middleware, the idea with express-validator is to check bad input before it reaches your controller.

Now, if you are using validator, you can make your own validation function in which you will simply pass the data and it will tell if the input is in accordance to it (Just like checking an Email, here you can have a function, which will check if input given to it is a function or not).

In case you are using Services in your structure, then you can use validator as I feel it's easy and of more control than express-validator

๐ŸŒ
DEV Community
dev.to โ€บ shanu001x โ€บ top-5-validation-libraries-for-javascript-in-2024-35la
Top 5 Validation Libraries for JavaScript in 2024 - DEV Community
August 3, 2024 - Joi and Yup are excellent for server-side and client-side validation. Validator.js is perfect for straightforward string validation, and class-validator is great for TypeScript and NestJS projects.
๐ŸŒ
npm Trends
npmtrends.com โ€บ just-validate-vs-pristinejs-vs-validate.js-vs-validator.js-vs-validatorjs
just-validate vs pristinejs vs validate.js vs validator.js vs validatorjs | npm trends
Comparing trends for just-validate 4.3.0 which has 7,062 weekly downloads and 585 GitHub stars vs. pristinejs 1.1.0 which has 3,559 weekly downloads and 433 GitHub stars vs. validate.js 0.13.1 which has 695,413 weekly downloads and 2,615 GitHub stars vs. validator.js 2.0.4 which has 8,342 weekly ...
Find elsewhere
๐ŸŒ
Parsleyjs
parsleyjs.org
Parsley - The ultimate JavaScript form validation library
Like no other form validation library, simply write in English your requirements inside your form HTML tags, Parsley will do the rest!
๐ŸŒ
npm
npmjs.com โ€บ package โ€บ validator
validator - npm
Here is a list of the sanitizers currently available. XSS sanitization was removed from the library in 2d5d6999. For an alternative, have a look at Yahoo's xss-filters library or at DOMPurify.
      ยป npm install validator
    
Published ย  Dec 18, 2025
Version ย  13.15.26
Author ย  Chris O'Hara
๐ŸŒ
Code Beautify
codebeautify.org โ€บ jsvalidate
Best JavaScript Validator Online
It helps to Validate JavaScript code. It also works as JS Checker or JavaScript syntax checker.
๐ŸŒ
Validatejs
validatejs.org
validate.js
Sometimes it's nice to be able validate field differently depending on the input itself. validate.js allows the validators object and validator options to be a function that should return the constraints/options:
๐ŸŒ
Jqueryvalidation
jqueryvalidation.org
jQuery Validation Plugin | Form validation with jQuery
https://cdn.jsdelivr.net/npm/jquery-validation@1.19.5/dist/additional-methods.min.js ยท https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.5/jquery.validate.js ยท https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.5/jquery.validate.min.js ยท
๐ŸŒ
Evon Technologies
evontech.com โ€บ component โ€บ easyblog โ€บ 10-useful-javascript-form-validation-libraries.html
10 Useful JavaScript Form Validation Libraries
March 21, 2017 - Parsley also comes with numerous predefined constraints, type constraints and extra validators. Verify.js, another MIT licensed form validation library, is fully customizable, easily extendable, unobtrusive, and includes grouped validations as well as asynchronous validations.
๐ŸŒ
Libhunt
js.libhunt.com โ€บ validator-js-alternatives
validator.js Alternatives - JavaScript Validation | LibHunt
Files such as validator.js, validator.min.js and files in lib/ folder are autogenerated when running tests (npm test) and need not to be changed manually.
๐ŸŒ
Express Validator
express-validator.github.io โ€บ introduction
express-validator | express-validator
express-validator is a set of express.js middlewares that wraps the extensive collection of validators and sanitizers offered by validator.js.
๐ŸŒ
Libhunt
js.libhunt.com โ€บ jquery-validation-alternatives
jquery-validation Alternatives - JavaScript Validation | LibHunt
November 12, 2025 - Allows writing the same validation logic for the client and server side. ... KnexBridge โ€” A TypeScript monorepo that introspects Knex databases and generates clean TypeScript types and Zod schemas automatically. * Code Quality Rankings and insights are calculated and provided by Lumnify. They vary from L1 to L5 with "L5" being the highest. Do you think we are missing an alternative of jquery-validation or a related project?
๐ŸŒ
Libhunt
js.libhunt.com โ€บ vee-validate-alternatives
vee-validate Alternatives - JavaScript Validation | LibHunt
1 month ago - Do you think we are missing an alternative of vee-validate or a related project? Add another 'Validation' Library ยท InfluxDB โ€“ Database Purpose-Built for High-Resolution Data ... ๐Ÿ Minimal: Only handles the complicated form concerns, gives you full control over everything else ยท ๐Ÿ˜Ž UI Agnostic: Works with native HTML elements or your favorite UI library components ยท ๐Ÿฆพ Progressive: Works whether you use Vue.js ...