Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
H

html-form-validator

> 前端框架
Open source

PHP form validation extracted from HTML forms. Write forms and validation once in the same place!

99 stars0 likes1 views
WebsiteGitHub

About

PHP form validation extracted from HTML forms. Write forms and validation once in the same place!

Thank you so much for being interested in this project! Open Source is rewarding, but it can also be exhausting. Therefor this code is provided as-is, and is currently not actively maintained. We invite you to peruse the code and even use it in your next project, provided you follow the included license!

No guarantee of support for the code is provided, and there is no promise that pull requests will be reviewed or merged. It’s open source, so forking is allowed; just be sure to give credit where it’s due!


As challenged by a tweet, this library extracts validation rules and filters from a html form and validates submitted user data against it.

It's pretty crazy what you have to do to get a form build in frameworks. Create a lot of php classes for elements, validation, etc. So why not build a html form and use the standard element attributes to extract the validation rules and filters. Together with some powerful html compliant data attributes you can create forms, customize validation rules and filters in one place.

Installation

bash
$ composer require xtreamwayz/html-form-validator

Documentation

All project documentation is located in the ./docs folder. If you would like to contribute to the documentation, please submit a pull request. You can read the docs online: https://xtreamwayz.github.io/html-form-validator/

Contributing

BEFORE you start work on a feature or fix, please read & follow the contributing guidelines to help avoid any wasted or duplicate effort.

Copyright and license

Code released under the MIT License. Documentation distributed under CC BY 4.0.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

PHPfiltershtml-formsphpvalidators

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架