2017 © Pedro Peláez
 

windwalker-package validator

Windwalker Validator package

image

windwalker/validator

Windwalker Validator package

  • Saturday, July 28, 2018
  • by asika32764
  • Repository
  • 3 Watchers
  • 0 Stars
  • 519 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 52 Versions
  • 8 % Grown

The README.md

Windwalker Validator

Windwalker Validator is a simple interface to help up validate strings., (*1)

Installation via Composer

Add this to the require block in your composer.json., (*2)

``` json { "require": { "windwalker/validator": "~3.0" } }, (*3)


## Simple Validate Process ``` php use Windwalker\Validator\Rule\EmailValidator; $validator = new EmailValidator; $validator->validate('sakura@flower.com'); // bool(true) $validator->validate('sakura'); // bool(false)

Available Validator Rules

  • AlnumValidator
  • BooleanValidator
  • ColorValidator
  • CreditcardValidator
  • EmailValidator
  • EqualsValidator
  • IpValidator
  • NoneValidator
  • PhoneValidator
  • RegexValidator
  • UrlValidator
  • CallbackValidator
  • CompareValidator
  • PhpTypeValidator

Regex Validator

``` php use Windwalker\Validator\Rule\RegexValidator;, (*4)

$validator = new RegexValidator('^[a-zA-Z0-9]*$', 'i');, (*5)

$validator->validate('abc_123:978'); // bool(false), (*6)


## Equals Validator ``` php use Windwalker\Validator\Rule\EqualsValidator; $validator = new EqualsValidator('ABC'); $validator->validate('ABC'); // bool(true)

Strict Mode:, (*7)

``` php $validator = new EqualsValidator(123, true);, (*8)

$validator->validate('123'); // bool(false), (*9)


## Error Message ``` php $validator->setMessage('This string is not valid'); if (!$validator->validate('sakura')) { throw new \Exception($validator->getError()); }

Create Your Own Validator

``` php use Windwalker\Validator\AbstractValidator;, (*10)

class MyValidator extends AbstractValidator { public function test($string) { return (bool) strlen($string); } }, (*11)

$validator = new MyValidator;, (*12)

$validator->validate('foo');, (*13)


## Extends Regex Validator ``` php use Windwalker\Validator\Rule\RegexValidator; class MyRegexValidator extends RegexValidator { protected $modified = 'i'; protected $regex = '[a-zA-Z]'; }

Composite

Match all., (*14)

use Windwalker\Validator\ValidatorComposite;

$validator = new ValidatorComposite([
    AlnumValidator::class,
    new PhoneValidator
]);

$validator->validate('1a2b'); // false
$validator->getResults(); // [true, false]

Match one., (*15)

use Windwalker\Validator\ValidatorComposite;

$validator = new ValidatorComposite([
    AlnumValidator::class,
    new PhoneValidator
])->setMode(ValidatorComposite::MODE_MATCH_ONE);

$validator->validate('1a2b'); // true
$validator->getResults(); // [true, false]

Use methods:, (*16)

$validator->validateOne($value);
$validator->validateAll($value);

The Versions

28/07 2018

dev-master

9999999-dev https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+ LGPL-2.0-or-later

The Requires

 

The Development Requires

framework validator windwalker

28/07 2018

3.4.4

3.4.4.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0-or-later

The Requires

 

The Development Requires

framework validator windwalker

08/07 2018

3.4.3

3.4.3.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0-or-later

The Requires

 

The Development Requires

framework validator windwalker

15/06 2018

3.4.1

3.4.1.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0-or-later

The Requires

 

The Development Requires

framework validator windwalker

15/06 2018

3.4.2

3.4.2.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0-or-later

The Requires

 

The Development Requires

framework validator windwalker

11/06 2018

3.4

3.4.0.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0-or-later

The Requires

  • php >=5.5.9

 

The Development Requires

framework validator windwalker

01/03 2018

dev-test

dev-test https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+ LGPL-2.0-or-later

The Requires

  • php >=5.5.9

 

The Development Requires

framework validator windwalker

01/03 2018

3.3.1

3.3.1.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0-or-later

The Requires

  • php >=5.5.9

 

The Development Requires

framework validator windwalker

01/03 2018

3.3.2

3.3.2.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0-or-later

The Requires

  • php >=5.5.9

 

The Development Requires

framework validator windwalker

20/02 2018

3.3

3.3.0.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0-or-later

The Requires

  • php >=5.5.9

 

The Development Requires

framework validator windwalker

25/06 2017

3.2.4

3.2.4.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.5.9

 

The Development Requires

framework validator windwalker

25/06 2017

3.2.5

3.2.5.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.5.9

 

The Development Requires

framework validator windwalker

25/06 2017

3.2.6

3.2.6.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.5.9

 

The Development Requires

framework validator windwalker

25/06 2017

3.2.7

3.2.7.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.5.9

 

The Development Requires

framework validator windwalker

25/06 2017

3.2.8

3.2.8.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.5.9

 

The Development Requires

framework validator windwalker

10/06 2017

3.2.2

3.2.2.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.5.9

 

The Development Requires

framework validator windwalker

10/06 2017

3.2.3

3.2.3.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.5.9

 

The Development Requires

framework validator windwalker

05/06 2017

3.2.1

3.2.1.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.5.9

 

The Development Requires

framework validator windwalker

05/06 2017

3.2

3.2.0.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.5.9

 

The Development Requires

framework validator windwalker

21/03 2017

3.1.4

3.1.4.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.3.10

 

The Development Requires

framework validator windwalker

21/03 2017

3.1.5

3.1.5.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.3.10

 

The Development Requires

framework validator windwalker

21/03 2017

3.1.6

3.1.6.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.3.10

 

The Development Requires

framework validator windwalker

11/10 2016

3.1

3.1.0.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.3.10

 

The Development Requires

framework validator windwalker

11/10 2016

3.1.1

3.1.1.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.3.10

 

The Development Requires

framework validator windwalker

11/10 2016

3.1.2

3.1.2.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.3.10

 

The Development Requires

framework validator windwalker

11/10 2016

3.1.3

3.1.3.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.3.10

 

The Development Requires

framework validator windwalker

18/07 2016

3.0

3.0.0.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.3.10

 

The Development Requires

framework validator windwalker

18/07 2016

3.0.1

3.0.1.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.3.10

 

The Development Requires

framework validator windwalker

04/07 2016

3.0-beta2

3.0.0.0-beta2 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.3.10

 

The Development Requires

framework validator windwalker

04/07 2016

3.0-beta

3.0.0.0-beta https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.3.10

 

The Development Requires

framework validator windwalker

12/02 2016

2.1.7

2.1.7.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.3.10

 

The Development Requires

framework validator windwalker

12/02 2016

2.1.8

2.1.8.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.3.10

 

The Development Requires

framework validator windwalker

12/02 2016

2.1.9

2.1.9.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.3.10

 

The Development Requires

framework validator windwalker

11/08 2015

2.1

2.1.0.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.3.10

 

The Development Requires

framework validator windwalker

11/08 2015

2.1.1

2.1.1.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.3.10

 

The Development Requires

framework validator windwalker

11/08 2015

2.1.2

2.1.2.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.3.10

 

The Development Requires

framework validator windwalker

11/08 2015

2.1.4

2.1.4.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.3.10

 

The Development Requires

framework validator windwalker

11/08 2015

2.1.5

2.1.5.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.3.10

 

The Development Requires

framework validator windwalker

11/08 2015

2.1.6

2.1.6.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.3.10

 

The Development Requires

framework validator windwalker

27/07 2015

2.0.9

2.0.9.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.3.10

 

The Development Requires

framework validator windwalker

16/12 2014

2.0.0

2.0.0.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.3.10

 

The Development Requires

framework validator windwalker

16/12 2014

2.0.1

2.0.1.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.3.10

 

The Development Requires

framework validator windwalker

16/12 2014

2.0.2

2.0.2.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.3.10

 

The Development Requires

framework validator windwalker

16/12 2014

2.0.3

2.0.3.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.3.10

 

The Development Requires

framework validator windwalker

16/12 2014

2.0.4

2.0.4.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.3.10

 

The Development Requires

framework validator windwalker

16/12 2014

2.0.5

2.0.5.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.3.10

 

The Development Requires

framework validator windwalker

16/12 2014

2.0.6

2.0.6.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.3.10

 

The Development Requires

framework validator windwalker

16/12 2014

2.0.7

2.0.7.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.3.10

 

The Development Requires

framework validator windwalker

16/12 2014

2.0.8

2.0.8.0 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.3.10

 

The Development Requires

framework validator windwalker

24/11 2014

2.0.0-beta2

2.0.0.0-beta2 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

LGPL-2.0+

The Requires

  • php >=5.3.10

 

The Development Requires

framework validator windwalker

05/10 2014

2.0.0-alpha

2.0.0.0-alpha https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

GPL-2.0+

The Requires

  • php >=5.3.10

 

The Development Requires

framework validator windwalker

05/10 2014

2.0.0-beta1

2.0.0.0-beta1 https://github.com/ventoviro/windwalker-validator

Windwalker Validator package

  Sources   Download

GPL-2.0+

The Requires

  • php >=5.3.10

 

The Development Requires

framework validator windwalker