Live data from Hacker News

Formance.js – Library for formatting and validating form fields

omarshammas.github.io

11–20 of 30 posts

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

#11
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.

You make a good point, I'm not familiar with many of these libraries. Can you please provide some links. I'm familiar with: - Stripe jQuery.payment.js (formance is based on this project, extended beyond payment forms) https://github.com/stripe/jquery.payment - Masked Input (good for basic formatting, and does not include validating) https://github.com/digitalBush/jquery.maskedinput - Validate.js (does not include for…

I think he meant JS libraries in general. Not just formatting libraries.

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

#14
post #12

I wish they wouldn't show error prompts when the user has just started entering characters

The demo was just meant to show what you can do with the formatters and the validators.

Those error prompts are not part of the library. In the demo, I setup some event listeners that get triggered on 'keyup change blur'. In the callback function, the value of the input field is validated and a message is shown to the user.

Maybe for your needs, it can be triggered on 'blur'. Or you even create your own setup. Formance.js simply provides the formatters and validators, and you can plug and play however you see fit.

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

#16
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.

yeah but for each category there is already hundreds of libraries with new ones popping up every week, it would be a massive time consuming effort to just analyze one category and keep up with any recent developments in it, times that by say 20 categories and your looking at 100's of hours of effort

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

#17
post #12

I wish they wouldn't show error prompts when the user has just started entering characters

I agree, way too many sites do this. I've done usability tests and users get scared that they're doing something wrong.

I just listen for a blur event and then display errors until it's actually valid.

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

#18
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.

You make a good point, I'm not familiar with many of these libraries. Can you please provide some links. I'm familiar with: - Stripe jQuery.payment.js (formance is based on this project, extended beyond payment forms) https://github.com/stripe/jquery.payment - Masked Input (good for basic formatting, and does not include validating) https://github.com/digitalBush/jquery.maskedinput - Validate.js (does not include for…

I was just speaking in general terms. I am not familiar enough with this particular niche to know all the competing libraries, which is basically my original point. I wouldn't use a library like this in any major product of mine until I did the necessary research and decided it was truly the best option. I imagine numerous other developers have the same process before relying on a library for their own projects. That is a lot of redundant work researching and evaluating these things.

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

#20

If I fill out the phone number all the way, then go back with the arrow keys and try to delete/change numbers, I get weird behavior

thanks for the feedback, I see the error as well. I created an issue and will take a closer a look.
Post reply on HN