Release: Validation Plugin 1.10.0

Wow, 11 months. It really has been 11 months since the 1.9.0 release. Interesting freelance times!

Anyway, the jQuery validation plugin 1.10.0 is here! While the very recently launched Pledige.org campaign is just at the start, I hope this release helps convince you that the project isn’t dead. On the contrary, this release brings you all the improvements that were built during those 11 months. A big chunk was contributed by Max Lynch, kudos to him!

What changed? One cool new feature is the ability to specify messages with data- attributes. The next release should bring more html5y support like that, but for now you can put data-msg="Please please fill out this field!" into your markup, or specify one message per method: data-msg-required="Really need this" data-msg-minlength="Moar characters please" (please don’t use these messages in your application…).

Apart from that we’ve got a ton of updates on the outskirts: Localized messages now use their correct ISO codes, a lot of language files got added or improved. Additional methods got a few new citizens and updates to existing methods.

Backwards compatibility is still going strong: The plugin should work with anything from jQuery 1.3.x to 1.8.x.

Download this release.

Don’t forget to donate and spread the word!

Click here to lend your support to: jQuery Validation Plugin and make a donation at www.pledgie.com !

The full changelog:

  • Corrected French strings for nowhitespace, phoneUS, phoneUK and mobileUK based upon community feedback.
  • rename files for language_REGION according to the standard ISO_3166-1 (http://en.wikipedia.org/wiki/ISO_3166-1), for Taiwan tha language is Chinese (zh) and the region is Taiwan (TW)
  • Optimise RegEx patterns, especially for UK phone numbers.
  • Add Language Name for each file, rename the language code according to the standard ISO 639 for Estonian, Georgian, Ukrainian and Chinese (http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)
  • Added croatian (HR) localization
  • Existing French translations were edited and French translations for the additional methods were added.
  • Merged in changes for specifying custom error messages in data attributes
  • Updated UK Mobile phone number regex for new numbers. Fixes #154
  • Add element to success call with test. Fixes #60
  • Fixed regex for time additional method. Fixes #131
  • resetForm now clears old previousValue on form elements. Fixes #312
  • Added checkbox test to require_from_group and changed require_from_group to use elementValue. Fixes #359
  • Fixed dataFilter response issues in jQuery 1.5.2+. Fixes #405
  • Added jQuery Mobile demo. Fixes #249
  • Deoptimize findByName for correctness. Fixes #82 – $.validator.prototype.findByName breaks in IE7
  • Added US zip code support and test. Fixes #90
  • Changed lastElement to lastActive in keyup, skip validation on tab or empty element. Fixes #244
  • Removed number stripping from stripHtml. Fixes #2
  • Fixed invalid count on invalid to valid remote validation. Fixes #286
  • Add link to file_input to demo index
  • Moved old accept method to extension additional-method, added new accept method to handle standard browser mimetype filtering. Fixes #287 and supersedes #369
  • Disables blur event when onfocusout is set to false. Test added.
  • Fixed value issue for radio buttons and checkboxes. Fixes #363
  • Added test for rangeWords and fixed regex and bounds in method. Fixes #308
  • Fixed TinyMCE Demo and added link on demo page. Fixes #382
  • Changed localization message for min/max. Fixes #273
  • Added pseudo selector for text input types to fix issue with default empty type attribute. Added tests and some test markup. Fixes #217
  • Fixed delegate bug for dynamic-totals demo. Fixes #51
  • Fix incorrect message for alphanumeric validator
  • Removed incorrect false check on required attribute
  • required attribute fix for non-html5 browsers. Fixes #301
  • Added methods “require_from_group” and “skip_or_fill_minimum”
  • Use correct iso code for swedish
  • Updated demo HTML files to use HTML5 doctype
  • Fixed regex issue for decimals without leading zeroes. Added new methods test. Fixes #41
  • Introduce a elementValue method that normalizes only string values (don’t touch array value of multi-select). Fixes #116
  • Support for dynamically added submit buttons, and updated test case. Uses validateDelegate. Code from PR #9
  • Fix bad double quote in test fixtures
  • Fix maxWords method to include the upper bound, not exclude it. Fixes #284
  • Fixed grammar error in german range validator message. Fixes #315
  • Fixed handling of multiple class names for errorClass option. Test by Max Lynch. Fixes #280
  • Fix jQuery.format usage, should be $.validator.format. Fixes #329
  • Methods for ‘all’ UK phone numbers + UK postcodes
  • Pattern method: Convert string param to RegExp. Fixes issue #223
  • grammar error in german localization file
  • Added Estonian localization for messages
  • Improve tooltip handling on themerollered demo
  • Add type=”text” to input fields without type attribute to please qSA
  • Update themerollered demo to use tooltip to show errors as overlay.
  • Update themerollered demo to use latest jQuery UI (along with newer jQuery version). Move code around to speed up page load.
  • Fixed min error message broken in Japanese.
  • Update form plugin to latest version. Enhance the ajaxSubmit demo.
  • Drop dateDE and numberDE methods from classRuleSettings, leftover from moving those to localized methods
  • Passing submit event to submitHandler callback
  • Fixed #219 – Fix valid() on elements with dependency-callback or dependency-expression.
  • Improve build to remove dist dir to ensure only the current release gets zipped up
  • Bumping version to 2.0.0pre
As usual:
  • Please post questions to the official Using jQuery Plugins Forum, tagging your question with (at least) “validate”. Keep your question short and succinct and provide code; a testpage makes it much more likely that you get an useful answer in no time.
  • Please post bug reports and other contributions (enhancements, features, eg. new validation methods) to the GitHub issue tracker

Enjoy!

Support the jQuery Validation Plugin

Validate forms like you’ve never been validating before!

Click here to lend your support to: jQuery Validation Plugin and make a donation at www.pledgie.com !

This has been the, a tad silly, tag line for the jQuery Validation Plugin for a few years now. Back in 2006, when Jörn Zaefferer started that plugin, he was still employed as a Java developer, contributing to jQuery mostly in his free time. Of the half-dozens plugins he started then, the Validation Plugin became the most succesful and is still quite popular today (builtwith.com knows about more than 300.000 websites using the plugin).

Since late 2010, when Jörn went freelance to focus on just JavaScript projects (no more Java!), maintenance of the plugin didn’t go as well as planned. Early 2012, appendTo was generous to support the project, namely with Max Lynch work through dozens of pull requests and issues, landing a total of 28 commits. Since Max went on to create his own startup, the project went rather quiet again.

This is going to change! And you can be a part of that!

Jörn is looking for donations to spend quality time on the project. The roadmap below outlines a lot of work, probably a lot more than than can be covered by the 4000€ he’s currently asking for.

But that also depends on how much people will contribute in other ways. One part of this effort is to build a community around the plugin.

How can you help?

There’s a few things you can do:

  • You can directly donate to the campaign, any amount helps.
  • You ask your friends, coworkers, boss, spouse and whoever else, to help. If you’re part of a local JavaScript meetup, ask people there.
  • You can also help with the project itself: Look at the roadmap below and see if there’s something you can help with directly or indirectly. Know a good designer who could help with logo and website design? See if you can get them in touch with me. Know a technical writer who could help with website copy and documentation? Also very welcome!

The campaign also provides a detailed roadmap for what I’m planning to do with the plugin.

Spread the word

Help us get enough donations to get this project the attention it deserves. Share it on Twitter, Facebook, G+, Orkut, in your office, local newspaper, train station, airport, parliament! Call your senator!

Linkbait II

In this second round of Linkbait, I’ve got a bunch of political or economical articles to kick things of.

This eerily reminds me of Shadowrun – not in a good way:

“The new texts reveal that TPP negotiators are considering a dispute resolution process that would grant transnational corporations special authority to challenge countries’ laws, regulations and court decisions in international tribunals that circumvent domestic judicial systems.”

In other words, corporations would get the ability to bypass national courts. Its not at all surprising that this trade agreement is negotiated behind closed doors, where 100% transparency would be in order.

Speaking of making laws, here’s a nice german example where more transparency would also help the matter. Also I like the cynical formulation here:

“Die Verbände von Zeitungs– und Zeitschriftenverlegern, BDZV und VDZ, gaben nur eine dürre gemeinsame Erklärung heraus, die sich liest, als seien ihre Sprecher mit Waffengewalt dazu gezwungen worden, sie zu formulieren, und hätten den Zugang zum Presseverteiler nur im Tausch gegen mehrere Konjunktive herausgerückt.”

Found in an article about the german “Leistungsschutzrecht”.

The Melting North

Back to more global discussions: Don’t you also agree that the melting artic is an awesome opportunity? No? Well, that’s what Shell thinks. And they’ve set up a big-ass campaign to convince others. With headlines like this:

For hundreds of years, explorers have battled the Arctic.
Today, we’re finally winning.

One activist group figured they could to something about that, and produced this fake PR fail video. Its pretty well done, but still a fake, as this making-of also shows.

Those PR and counter-PR campaigns are rather useless if you actually want to get to know what’s going on in the Artic. More by chance I found a special about that exact topic in The Economist (read it on the plane to SF). The full special can be read online, starting with “The Melting North”. There’s seven more articles in that series – the links are somewhat hidden in a popup menu above the main header (look for “Special report: The Arctic”).

Keep in mind that The Economist, let’s say, isn’t sceptic of capitalism. In this case I think that’s actually a healthy perspective, as you’d want to understand the perspective of companies like Shell.

Closing Videos

If you’ve came this far, you’ve deserved something kick back and watch. To start, someone explains how to use an Abacus. Its in german though. In particular the division, close to the end, is really interesting:

https://www.youtube.com/watch?v=jwabVzlobZI

Watch Dogs Gameplay Trailer

And one more video, a gameplay trailer for “Watch Dogs”. This is pretty much the most impressive video game trailer I’ve seen in a long time. And not just because it shows actual gameplay (instead of pointless prerendered scenes). The game seems to be an open world game with plenty of gameplay options, in a setting that looks like a bit like a mixture of Neuromancer (aka pure Cyberpunk, not the Shadowrun fantasy mashup) and Daniel Suarez’ Daemon/Freedom duology (which I can’t recommend enough). Especially the last scene, where other agents are “activated” to help the main character, seems to be heavily inspired by the Darknet.

Talk Checklist

There’s a new page on this site, the Talk Checklist. It’s just that: A checklist to go through when preparing a talk for meetups or conferences. It also includes a few bullets that could help with creating the outline for the talk and the actual execution.

As the page itself also says: This is a checklist I started 2011 to use whenever I prepare a talk, and to update after I learned something new. If you have ideas for further improvements, let me know. Just keep in mind that it should be kept as a checklist, details must live elsewhere.

I’ve published that now to contribute something to weareallaweso.me. As a meetup-co-organizer I’m generally looking for speakers, and that site has plenty of information that hopefully encourages more people to get involved at meetups and conferences.