PHPackages                             flsouto/param - 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. flsouto/param

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

flsouto/param
=============

Cool API for validating and filtering any source of input

1.0.5(9y ago)02181PHP

Since Nov 6Pushed 9y agoCompare

[ Source](https://github.com/flsouto/param)[ Packagist](https://packagist.org/packages/flsouto/param)[ RSS](/packages/flsouto-param/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (1)Versions (7)Used By (1)

Param
=====

[](#param)

Overview
--------

[](#overview)

This library allows you to extract, filter and validate individual fields from an associative array. It can be used, as an example, to validate request variables sent from a web browser. You give each parameter a "name", define the "context" and call "process"; the result will be the value extracted from the context or an error message in case of not conforming to one or more validation filters. Many predefined filters and validators are available from a "finger-friendly" API. You can also specify a fallback value to be returned in case of validation error.

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

[](#installation)

Install via composer:

```
composer require flsouto/param

```

Usage
-----

[](#usage)

The example bellow creates a parameter and prints out its name

```
