DEV Community

Discussion on: Input Validation: Client-side or Server-side?

Collapse
 
suckup_de profile image
Lars Moelleken

What do you think of a something like this: github.com/voku/HtmlFormValidator

How does this work?

  1. First you need to generate a html form, that's completely your part. You can write it manually or you can generate with a framework or a library, it doesn't matter.

  2. Then we use DOM Parsing via voku/simple_html_dom, to detect the current validator and filter rules directly from the html.

  3. And finally, we use Respect/Validation to validate the form.