Hacker News new | past | comments | ask | show | jobs | submit login

So the user would have to submit the form and be met with 10s of errors? I'd rather tell them immediately.



Sure, and React is the best way to show a message in response to an input in a web form, right?

Let me tell you some news, they just launched an integration of this new HTML <form> thing with javascript, so you can have JS listening to inputs and displaying information anywhere on the page. Cool, isn't it?

Ah, but the sad part, again, is you don't get to download an unnecessary library for that. It comes baked and activated into all browsers by default. It doesn't make your resume shine, either...


(P)React is the best way to do it in a maintainable, easy-to-reuse, easy-to-understand, extendable fashion, indeed. Show me something better and I'll jump on it.

I don't care about resumes, I own my consultancy. I care about quickly solving business problems for my clients, not making new problems in the process, and reusing the solutions. I am not paid hourly, I don't make money from fixing spaghetti code broken by adding a stateful form control elsewhere.


Just saying: You can do input validation without JS using the pattern attribute.


If people typically get 10s of errors on a single form, it might well be better to split it up into several sub forms.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: