PHPackages                             broeser/wellid - 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. broeser/wellid

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

broeser/wellid
==============

wellid is a set of PHP validators and a few loosely coupled components for validation.

0.4.0(10y ago)096MITPHPPHP &gt;=5.6.0

Since Jan 21Pushed 10y ago1 watchersCompare

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

READMEChangelog (3)Dependencies (1)Versions (8)Used By (0)

[![wellid](https://camo.githubusercontent.com/3e809bd5186ae3c9dd5b1ea4e51fe475824c6313bb4570f0f2cd5cbb7c8a9f71/687474703a2f2f62726f657365722e6769746875622e696f2f77656c6c69642f696d616765732f77656c6c69642d6c6f676f2e737667)](https://camo.githubusercontent.com/3e809bd5186ae3c9dd5b1ea4e51fe475824c6313bb4570f0f2cd5cbb7c8a9f71/687474703a2f2f62726f657365722e6769746875622e696f2f77656c6c69642f696d616765732f77656c6c69642d6c6f676f2e737667)
===============================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#)

wellid is a set of PHP validators and a few loosely coupled components for validation.

[![Build Status](https://camo.githubusercontent.com/2b07350f85e5c53661581a86b8354eba8b689acff9dca9d260d7c39c83a87f2d/68747470733a2f2f7472617669732d63692e6f72672f62726f657365722f77656c6c69642e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/broeser/wellid)[![codecov.io](https://camo.githubusercontent.com/4679deca3c3d6663264b4bf059376461fdb9303cfc9d368adef26792556e551c/68747470733a2f2f636f6465636f762e696f2f6769746875622f62726f657365722f77656c6c69642f636f7665726167652e7376673f6272616e63683d6d6173746572)](https://codecov.io/github/broeser/wellid?branch=master)[![License](https://camo.githubusercontent.com/e498eead712d82d9ee1af0a4850acd2e46ea48c48fb9ce5a3d2ab64f28f95b34/687474703a2f2f696d672e736869656c64732e696f2f3a6c6963656e73652d6d69742d626c75652e737667)](http://mit-license.org)[![SemVer 2.0.0](https://camo.githubusercontent.com/80a092585308866a22318249288bb79a8841799ea528d3dacfc53bdfb8e23ecf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f73656d7665722d322e302e302d626c75652e737667)](http://semver.org/spec/v2.0.0.html)

Latest stable version: 0.4.0

Goals
-----

[](#goals)

- wellid should be easy to use and easy to learn
- It is up to you, how much of the wellid-package you use, you can start with small building blocks and use bigger concepts later
- Extending wellid with your own Validators should be easy

Installation
------------

[](#installation)

wellid works with PHP 5.6 and 7.0.

The package can be installed via composer:

`composer require broeser/wellid`

Before you start
----------------

[](#before-you-start)

- All examples from this manual can be found in [usage\_examples.php](usage_examples.php)in the same order as in the manual. If an example uses an additional class, that class can be found in the examples/-directory.
- **IMPORTANT NOTE:** Never try to validate raw data! Sanitize your data first, then pass it to wellid. Recommended sanitization options are:
    1. Let your framework handle sanitization
    2. Use [Sanitor](https://github.com/broeser/sanitor) (composer require broeser/sanitor)
    3. Use PHP's filter\_input() and filter\_var() methods

Using wellid
------------

[](#using-wellid)

### Simple use case *with validateBool()*

[](#simple-use-case-with-validatebool)

```
