2017 © Pedro Peláez
 

library validators

PHP validators for RFC compliance

image

atelierspierrot/validators

PHP validators for RFC compliance

  • Friday, January 1, 2016
  • by picas
  • Repository
  • 1 Watchers
  • 1 Stars
  • 113 Installations
  • HTML
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

Validators

Build Status documentation A PHP validators package to test RFC's compliance., (*1)

Usage

All validators must implement the \Validator\ValidatorInterface which defines two methods:, (*2)

  • validate( thing ) which must return a boolean value indicating if thing passes the validation test
  • sanitize( thing ) which must return a sanitized version of thing that must pass the validation test

Example usage of the \Validator\EmailValidator (use the same process for each validator):, (*3)

$thing = 'my.address@email.com';

$v = new \Validator\EmailValidator();
if ($v->validate($thing)) {
    // $thing is OK ...

} else {
    // $thing is KO ...

    $new_thing = $v->sanitize($thing);
    // $new_thing must be OK ...
}

Installation

For a complete information about how to install this package and load its namespace, please have a look at our USAGE documentation., (*4)

If you are a Composer user, just add the package to the requirements of your project's composer.json manifest file:, (*5)

"atelierspierrot/validators": "@stable"

You can use a specific release or the latest release of a major version using the appropriate version constraint., (*6)

Author & License

Validators, (*7)

http://github.com/atelierspierrot/validators, (*8)

Copyright (c) 2013-2016 Pierre Cassat and contributors, (*9)

Licensed under the Apache 2.0 license., (*10)

http://www.apache.org/licenses/LICENSE-2.0, (*11)


Les Ateliers Pierrot - Paris, France, (*12)

http://www.ateliers-pierrot.fr/ - contact@ateliers-pierrot.fr, (*13)

The Versions

01/01 2016
01/01 2016

dev-master

9999999-dev http://github.com/atelierspierrot/validators

PHP validators for RFC compliance

  Sources   Download

Apache-2.0

The Requires

  • php >=5.3.0

 

The Development Requires

validator

05/03 2015

v1.1.0

1.1.0.0 http://github.com/atelierspierrot/validators

PHP validators for RFC compliance

  Sources   Download

Apache-2.0

The Requires

  • php >=5.3.0

 

The Development Requires

validator

21/02 2015

v1.0.3

1.0.3.0 http://github.com/atelierspierrot/validators

PHP validators for RFC compliance

  Sources   Download

GPL-3.0

The Requires

  • php >=5.3.0

 

The Development Requires

validator

22/06 2014

v1.0.2

1.0.2.0 http://github.com/atelierspierrot/validators

PHP validators for RFC compliance

  Sources   Download

GPL-3.0

The Requires

  • php >=5.3.0

 

The Development Requires

validator

14/06 2014

v1.0.1

1.0.1.0 http://github.com/atelierspierrot/validators

PHP validators for RFC compliance

  Sources   Download

GPL-3.0

The Requires

  • php >=5.3.0

 

The Development Requires

validator

16/10 2013

v1.0.0

1.0.0.0 http://github.com/atelierspierrot/validators

PHP validators for RFC compliance

  Sources   Download

GPL-3.0

The Requires

  • php >=5.3.0

 

The Development Requires

validator