Live data from Hacker News

Formance.js – Library for formatting and validating form fields

omarshammas.github.io

21–30 of 30 posts

Re: Formance.js – Library for formatting and validating form fields

#21
If you're looking for a nice validation API that doesn't require jQuery, I've been working on one recently for forms: https://github.com/segmentio/validate

I personally really dislike working with jQuery plugins, because their APIs tend to be very poorly thought out. And using strings as a way to call methods is generally unfortunate, especially when they are snake-cased like these ones.

Re: Formance.js – Library for formatting and validating form fields

#22

If you're looking for a nice validation API that doesn't require jQuery, I've been working on one recently for forms: https://github.com/segmentio/validate I personally really dislike working with jQuery plugins, because their APIs tend to be very poorly thought out. And using strings as a way to call methods is generally unfortunate, especially when they are snake-cased like these ones.

I'm watching your repo to see how it evolves, I like the structure of your api. Best of luck.

Regarding Formance, it uses jQuery to setup the necessary event listeners to provide the field formatting.

On the other note snake-cased is a preference, I would happily provide camelCased if there is demand.

Re: Formance.js – Library for formatting and validating form fields

#25
post #2

Somewhat off topic, but I wish there was a credible site out there that reviewed these type of general libraries. There are hundreds of them out there and when I need to find one it usually comes with hours of research trying to decide on the right one to use. It would be great if there was a place to look up the general strengths and weaknesses of each without doing all the necessary leg work.

There is the jQuery Plugin Registry (http://plugins.jquery.com/). There aren't many people using it tho.

There is also a really simple guideline to publish your plugin there: http://plugins.jquery.com/docs/publish/

Currently, there is no way to review which plugin is better. But at least it shows the number of watchers for each plugin, which can be an okay indicator whether a plugin is good or bad.

Re: Formance.js – Library for formatting and validating form fields

#26
post #23

You should make these compatible with Parsley.js: http://parsleyjs.org/documentation.html

First time I hear of Parsley.js. I will check it out, thanks

Parsley.js is absolutely fantastic. I've been able to cover 95% of my usual form validation for various websites by just including a few attributes on my form inputs. That is about as elegant as form validation can get in my opinion. Some of your functionality is already covered but I'm pretty sure they don't have some of the Canada specific functionality you have. Might warrant a Parsley plugin.

Re: Formance.js – Library for formatting and validating form fields

#28
post #2

Somewhat off topic, but I wish there was a credible site out there that reviewed these type of general libraries. There are hundreds of them out there and when I need to find one it usually comes with hours of research trying to decide on the right one to use. It would be great if there was a place to look up the general strengths and weaknesses of each without doing all the necessary leg work.

There is the jQuery Plugin Registry ( http://plugins.jquery.com/ ). There aren't many people using it tho. There is also a really simple guideline to publish your plugin there: http://plugins.jquery.com/docs/publish/ Currently, there is no way to review which plugin is better. But at least it shows the number of watchers for each plugin, which can be an okay indicator whether a plugin is good or bad.

That is useful, but obviously only applies to jQuery plugins.

Re: Formance.js – Library for formatting and validating form fields

#29
post #2

Somewhat off topic, but I wish there was a credible site out there that reviewed these type of general libraries. There are hundreds of them out there and when I need to find one it usually comes with hours of research trying to decide on the right one to use. It would be great if there was a place to look up the general strengths and weaknesses of each without doing all the necessary leg work.

Agreed...and you're not the first person to mention this need.

A good curation/ranking site for all of the various JS libs would be helpful.

Its wasteful for every developer to read the code of numerous JS libs just to figure out which one(s) was(were) written well.

Re: Formance.js – Library for formatting and validating form fields

#30
post #2

Somewhat off topic, but I wish there was a credible site out there that reviewed these type of general libraries. There are hundreds of them out there and when I need to find one it usually comes with hours of research trying to decide on the right one to use. It would be great if there was a place to look up the general strengths and weaknesses of each without doing all the necessary leg work.

There is http://www.jsdb.io/ and there is another one which I'm searching in my bookmarks, will update.

EDIT: found it - http://jster.net/

Post reply on HN