PHPackages                             jridgewell/form-validator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. jridgewell/form-validator

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

jridgewell/form-validator
=========================

A simple HTML form validator

v1.1.2(13y ago)031MITPHPPHP &gt;=5.3.0

Since May 26Pushed 13y ago1 watchersCompare

[ Source](https://github.com/jridgewell/FormValidator)[ Packagist](https://packagist.org/packages/jridgewell/form-validator)[ Docs](https://github.com/jridgewell/FormValidator)[ RSS](/packages/jridgewell-form-validator/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (1)Versions (9)Used By (0)

FormValidator [![Build Status](https://camo.githubusercontent.com/25e13b1bd6c8e9769b953cd2dd5bf162808aad78328ee63cc5efbc1c6e0adf5d/68747470733a2f2f7472617669732d63692e6f72672f6a726964676577656c6c2f466f726d56616c696461746f722e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/jridgewell/FormValidator)
=====================================================================================================================================================================================================================================================================================================================

[](#formvalidator-)

FormValidator allows you to create and validate forms using a simple rule based approach. It uses an API very similar to Rails' ActiveRecord.

Basics
------

[](#basics)

A form file is just a class that extends the \\FormValidator\\Form class In this example, the form validator checks if `name` isn't empty

### test.form.php (the model)

[](#testformphp-the-model)

```

```

### index.php (the controller)

[](#indexphp-the-controller)

```
