2017 © Pedro Peláez
 

library validation

Broad variation of validation

image

klapuch/validation

Broad variation of validation

  • Sunday, October 8, 2017
  • by klapuch
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4,436 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 12 Versions
  • 9 % Grown

The README.md

Validation

Build Status Build status Coverage Status, (*1)

Documentation

Installation

composer require klapuch/validation, (*2)

Usage

Single rule

(new EmptyRule())->satified('abc'); // false
(new EmptyRule())->satified(''); // true
(new EmptyRule())->apply('abc'); // \UnexpectedValueException - 'Subject is not empty'
(new FriendlyRule(new EmptyRule(), 'Not empty!'))->apply('abc'); // \UnexpectedValueException - 'Not empty!'

Chained rule

(new ChainedRule(
    new FriendlyRule(
        new NegateRule(new EmptyRule()),
        'Value can not be empty'
    ),
    new LengthRule(10),
    new PassiveRule, // it does nothing
    new EmailRule(),
))->apply('abc');

The above code says that a value can not be empty, length of the value must be exact 10 characters and the value must be email., (*3)

The Versions

17/03 2017

2.4.0

2.4.0.0 https://www.github.com/klapuch/Validation

Broad variation of validation

  Sources   Download

The Requires

  • php >=7.1
  • ext-mbstring *

 

The Development Requires

12/03 2017

2.3.0

2.3.0.0 https://www.github.com/klapuch/Validation

Broad variation of validation

  Sources   Download

The Requires

  • php >=7.1
  • ext-mbstring *

 

The Development Requires

29/12 2016

2.2.0

2.2.0.0 https://www.github.com/klapuch/Validation

Broad variation of validation

  Sources   Download

The Requires

  • php >=7.1
  • ext-mbstring *

 

The Development Requires

15/12 2016

2.1.0

2.1.0.0 https://www.github.com/klapuch/Validation

Broad variation of validation

  Sources   Download

The Requires

  • php >=7.1
  • ext-mbstring *

 

The Development Requires

13/12 2016

2.0.0

2.0.0.0 https://www.github.com/klapuch/Validation

Broad variation of validation

  Sources   Download

The Requires

  • php >=7.1
  • ext-mbstring *

 

The Development Requires

10/12 2016

1.1.0

1.1.0.0 https://www.github.com/klapuch/Validation

Broad variation of validation

  Sources   Download

The Requires

  • php >=7.1
  • ext-mbstring *

 

The Development Requires

03/12 2016

1.0.0

1.0.0.0 https://www.github.com/klapuch/Validation

Broad variation of validation

  Sources   Download

The Requires

  • php >=7.1
  • ext-mbstring *

 

The Development Requires