PHPackages                             fruitware/php-form-validation - 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. fruitware/php-form-validation

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

fruitware/php-form-validation
=============================

PHP form validation Class , simple and easy to use class , yet flexible and easy to upgrade

0.0.1(11y ago)1181GPL v2PHPPHP &gt;=5.3.3

Since Dec 1Pushed 3y agoCompare

[ Source](https://github.com/Fruitware/PHP-Form-Validation)[ Packagist](https://packagist.org/packages/fruitware/php-form-validation)[ Docs](https://github.com/ASoares/PHP-Form-Validation)[ RSS](/packages/fruitware-php-form-validation/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

ValidFluent
===========

[](#validfluent)

A simple, flexible and easy to use PHP form validation class (uses a fluent interface )

**Note:** index.php has a typical example , if anyone decides to use this , please double check the spelling on error messages ;-)

@author Andre Soares

**License:**

GPL v2

**typical use:**

```
$valid = new ValidFluent($_POST);
$valid->name('user_name')->required('You must chose a user name!')->alfa()->minSize(5);
$valid->name('user_email')->required()->email();
$valid->name('birthdate')->date('please enter date in YYYY-MM-DD format');
if ($valid->isGroupValid()) echo 'Validation Passed!';

```

**OR:**

```
$valid = new ValidFluent($_POST);
if ( $valid->name('user_name')->required('You must chose a user name!')->alfa()->minSize(5)
	    ->name('user_email')->required()->email()
	    ->name('birthdate')->date('please enter date in YYYY-MM-DD format')
	    ->isGroupValid() )
    echo 'Validation passed!';

```

**On HTML Form:**

```
