Parsley.js: declarative form validation driven by HTML attributes
Validate your forms, frontend, without writing a single line of javascript
At a glance
- What is it?
- Parsley.js validates forms in the browser from data-parsley-* attributes instead of handwritten JavaScript. It is stable, feature-frozen, and still depends on jQuery, which decides most of the adoption question.
- Who is it for?
- Parsley.js fits teams maintaining jQuery-era pages that want attribute-driven validation without rewriting their markup, and it installs from npm or a CDN with no build step. It is the wrong choice for a new project with no jQuery dependency, and for anyone who needs new validation features, since the README states the project is considered stable with no new features planned.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 127 days ago.
- What is it written in?
- Mainly JavaScript, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 29, 2026, and from our analysis. They are not legal advice.
Editorial analysis
The problem Parsley.js solves, and the markup it expects
Handwritten form validation tends to rot. Every new field means another branch in a submit handler, another error string, another place where the client rules and the server rules disagree. Parsley.js moves that logic into the HTML: you annotate inputs with data-parsley-* attributes and the library reads the DOM, decides which constraints apply, and renders messages. The README's own summary is blunt about the goal: validation "without actually writing a single line of JavaScript."
The audience is narrow and specific. It is for teams with server-rendered pages, template languages that emit attributes easily (the README lists CakePHP, Django, Rails and Drupal integrations), and an existing jQuery dependency. If your templates can print a data-parsley-* attribute on an input, you get client-side validation without a JavaScript build pipeline. If your stack is a modern component framework, the attribute approach fights the framework rather than helping it.
How Parsley.js binds to the DOM and where messages come from
Parsley's mechanism is DOM scanning plus a constraint registry. The library walks the form, reads the attributes on each field, and maps them to validators. The package metadata describes it as a form validation library with "html5" and "polyfill" among its keywords, which matches the design: it mirrors native constraint attributes rather than inventing a parallel vocabulary.
Messages are the part people underestimate. Parsley ships default strings per validator, and the markup lets you override them per field. That is why "parsley js custom error message" is a common search: the override is an attribute on the input, not a JavaScript configuration object, and it is easy to put it on the wrong element or misspell the constraint name it belongs to. The practical consequence is that message text lives in your templates next to the field, which is good for translators and awkward if you want a single central message catalogue.
The dependency story is equally concrete. jQuery >= 1.8 is required according to the README, and it notes compatibility with jQuery 2.x and 3.0. For IE8 support the README points at es5-shim. There is no jQuery-free build.
Installing Parsley.js and running a first validation pass
The npm package is named parsleyjs. The package.json sets "main" to dist/parsley.js, so a bundler resolves the built file rather than the src/ directory.
npm install parsleyjsThe README also lists an OSSCDN integration, which is the path for pages that load scripts with a tag instead of a bundler. Either way, jQuery has to be present first, since it is a runtime dependency.
The README does not give an HTML usage example, so the first real use to verify is the library's own environment. It documents the first-time setup with a global gulp install followed by a local install:
npm install -g gulpnpm installAfter that, gulp test runs the suite in the terminal. The README also documents gulp test-browser, which starts a server so you can open test/runner.html in a browser. Building the distribution and the annotated source is gulp build, which writes dist/ and doc/annotated-source. Those four commands are the whole documented developer workflow; anything beyond them comes from the documentation under doc/ and index.html, which the README points to rather than reproducing.
Where Parsley.js stops being the right tool
The README answers the maintenance question directly: "This project is considered stable, no new features are planned." Maintenance is described as minimal, handled by @marcandre, with bug-fixing pull requests accepted and a request to enquire before working on new features. The last push to the default branch was on 2026-05-26, and the most recent release listed is 2.9.2 from 2021-11-21. Anyone planning to build on Parsley should treat the API surface as closed.
There are structural limits too. Client-side validation is not a security boundary; Parsley runs in the browser and can be bypassed, so server-side validation remains mandatory. The jQuery requirement is a real cost in a codebase that has otherwise dropped it. And the attribute-driven model gets awkward for validation that depends on values across fields or on remote state, because that logic does not fit neatly into a per-field attribute.
One more practical gap: the README points questions at StackOverflow with the parsley.js tag and asks for a runnable example, starting from a linked jsfiddle. That is the support channel. There is no promise of maintainer response on the issue tracker for feature requests.
Parsley.js compared with native HTML5 constraint validation
The closest alternative is the browser itself. Native constraint validation uses required, type="email", pattern, minlength and maxlength, needs no library and no jQuery, and the browser renders the messages. The difference in approach is control: native messages are styled and worded by the browser, vary between vendors, and are hard to customize consistently, while Parsley renders its own messages from its own defaults and your attribute overrides.
Native validation also gives you no hook for the kind of declarative extras Parsley offers, such as a range declared as an attribute on the field. If your forms are simple and your design tolerates browser-default bubbles, native validation removes a dependency rather than adding one. If you need consistent styling, translatable strings and validation that works the same across browsers including older ones, that is the gap Parsley fills. The trade is a jQuery dependency and a frozen feature set.
Licence and the cost of staying on Parsley.js
Parsley.js is released under the MIT License, and the README points to the bundled LICENSE file. The package.json declares "license": "MIT" and lists jquery as a dependency with the range >=1.8.0. MIT is permissive, so the practical obligations are the usual ones: keep the copyright notice and licence text with distributions. Whether that fits a particular product is a question for your own legal review, not something the repository answers.
Upgrade cost is the more interesting number. The repository carries UPGRADE-2.0.md, UPGRADE-2.1.md and UPGRADE-2.2.md, which tells you the 2.x line had breaking changes worth documenting. Since 2.9.2 in 2021-11-21 there has been no further release, and the README states no new features are planned. So the upgrade horizon is short: you are adopting a finished library, not tracking a moving one. Budget for the jQuery version you pin, not for Parsley releases. If a future jQuery major version breaks Parsley, the README gives no compatibility promise beyond 3.0.
Editorial conclusion
Parsley.js fits teams maintaining jQuery-era pages that want attribute-driven validation without rewriting their markup, and it installs from npm or a CDN with no build step. It is the wrong choice for a new project with no jQuery dependency, and for anyone who needs new validation features, since the README states the project is considered stable with no new features planned. Verify first that your jQuery version is at least 1.8, that your fields carry the data-parsley-* attributes you expect, and that your message overrides live where Parsley looks for them.
Frequently asked questions
What is Parsley.js used for?
It validates HTML forms in the browser. The README describes it as JavaScript form validation without writing a single line of JavaScript, driven by attributes on the form fields.
What is Parsley.js?
Parsley.js is a client-side form validation library written in JavaScript, released under the MIT License, with jQuery as its only runtime dependency.
Is Parsley.js still maintained?
The README states the project is considered stable with no new features planned, and that maintenance is minimal with bug-fixing pull requests accepted. The most recent release listed is 2.9.2 from 2021-11-21.
What does Parsley.js require to run?
jQuery 1.8 or later, per the README, which notes compatibility with jQuery 2.x and 3.0. For IE8 support the README points to es5-shim.
How do I set a custom error message in Parsley.js?
Message overrides are declared on the field in the markup, alongside the constraint they belong to, rather than in a central JavaScript configuration object. The README does not document the exact attribute syntax, so check the documentation under doc/ and index.html.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/guillaumepotier-parsley-js)