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

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

hundredminds/php-validation
===========================

A PHP 5.3 Class for Easy Form Validation, forked from blackbelt/php-validation

1.2(11y ago)13.8k2PHPPHP &gt;=5.3

Since Jan 22Pushed 11y ago4 watchersCompare

[ Source](https://github.com/HundredMinds/php-validation)[ Packagist](https://packagist.org/packages/hundredminds/php-validation)[ RSS](/packages/hundredminds-php-validation/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (3)DependenciesVersions (3)Used By (0)

A PHP 5.3 Class for Easy Form Validation
========================================

[](#a-php-53-class-for-easy-form-validation)

This class follows Zend Framework naming conventions for easy drop-in as a substitute to Zend\_Validation. If you opt out of using the bulky Zend\_Form on your projects, you might choose to use this for quick and painless form validation.

A Quick Example
---------------

[](#a-quick-example)

The example below shows how to throw validation exceptions with the custom exception. You can then retrieve the error messages from the calling method. It is not good practice to validate your data in your controller, this should be handled in your Model. This is just a quick example.

```
