Quantcast
Channel: test.ical.ly » Javascript
Viewing all articles
Browse latest Browse all 10

Easiest client-side form validation with Happy.js

$
0
0

I am currently playing with some javascript on a little idea that I had. It’s basically all about client-side templating and I decided to use Zepto.js (tiny drop in replacement jQuery) together with ICanHaz.js. Following links on the ICanHaz.js website I found the company &yet where I stumbled upon another great little tool doing form validation.

Happy.js

It’s basic principles are similar to those of ICanHaz.js. You use a bunch of CSS classes for identifying form fields and error messages and include the library to get started.

Then you define your validation scheme as a json object. and that’s it.

As you can use any javascript function to do the validation test you can reuse code and test about everything you might need.

Of course the more fail-prove validation would be on the server side. Still client-side makes sense to provide quick feedback to the user.

And of course if combined with node.js you can use this little helper on the server-side just as well.


Viewing all articles
Browse latest Browse all 10

Trending Articles