Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> You can read directly from the input's ValidityState (input.validity)

Feels like I don't gain much from that. Native validation is very limited and the few cases that it covers are super simple to implement already. Am I missing something?

I'd rather have a `validateSomething` which returns a discriminated union of error causes than using `pattern` and just getting a boolean.

> In my project I have a "HiddenValidationInput" component

Yeah, that's an accessibility issue (and the UX for the common user is terrible too for multiple reasons).




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: