2017 © Pedro Peláez
 

library zf2-validators-empty-or

Logical OR validator chains and empty value validator for Zend Framework 2.

image

jim-moser/zf2-validators-empty-or

Logical OR validator chains and empty value validator for Zend Framework 2.

  • Friday, September 16, 2016
  • by TheDisposer
  • Repository
  • 1 Watchers
  • 0 Stars
  • 22 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 0 % Grown

The README.md

Overview

This package contains the JimMoser\EmptyValidator, JimMoser\OrChain, and JimMoser\VerboseOrChain validators for Laminas Framework 2., (*1)

EmptyValidator is a validator that is valid for empty values. It can be considered the logical opposite of the Laminas\Validator\NotEmpty validator., (*2)

The OrChain and VerboseOrChain validators are validator chains similar to Laminas\Validator\ValidatorChain except that they link validators using a logical OR instead of a logical AND., (*3)

VerboseOrChain serves the same purpose as OrChain but provides added validation failure messages., (*4)

See the comments within the source code of the validators for more detailed information on each of them., (*5)

This is a base package with the minimal dependencies needed to provide the validators. Unit tests and a Module.php file for providing configuration to the Laminas Framework validator plugin manager are provided in separate packages., (*6)

This package along with the jim-moser/zf2-validators-empty-or-test package are recommended if using the laminas/laminas-validator package in a "non-Laminas Framework" environment. In other words, an environment where laminas/laminas-module-manager and other key components of the Laminas Framework are not installed., (*7)

For more complete Laminas Framework installations, the jim-moser/zf2-validators-empty-or-plugin and jim-moser/zf2-validators-empty-or-plugin-test packages are recommended instead., (*8)

See http://epicride.info/JimMoser/zendframework/or_validator.php for an explanation why the EmptyValidator, OrChain, and VerboseOrChain validators were created., (*9)

Dependencies

This package depends directly on code and classes only from laminas/laminas-validator and laminas/laminas-stdlib., (*10)

The laminas/laminas-validator package contains code with dependencies on code within the laminas/laminas-servicemanager and laminas/laminas-i18n packages but these dependencies are not listed in its composer.json file. These dependencies need to be installed if using the validator plugin manager (Laminas/Validator/ValidatorPluginManager). If your application uses the validator plugin manager then you should either use the jim-moser/zf2-validators-empty-or-plugin package (recommended) or add these dependencies to your application's composer.json file., (*11)

Beware that your application may use the validator plugin manager even if your application's custom code never calls it directly. For example, the JimMoser\OrChain and JimMoser\VerboseOrChain classes use the validator plugin manager to add validators by name. In the code below the attachByName() method call results in the JimMoser\OrChain object using a Laminas\Validator\ValidatorPluginManager instance to create a Laminas\Validator\NotEmpty validator instance., (*12)

$orChain = new \JimMoser\OrChain();
$orChain->attachByName('NotEmpty');

Related Packages

jim-moser/zf2-validators-empty-or

Base package containing EmptyValidator, OrChain, and VerboseOrChain validators for Laminas Framework 2., (*13)

This package has the fewest dependencies. Depends directly on laminas/laminas-validator and laminas/laminas-stdlib., (*14)

Does not include unit testing. The unit testing is available in the jim-moser/zf2-validators-empty-or-test package., (*15)

Does not include the Module.php and configuration file used to inform the validator plugin manager of the validators added by this package. These files are provided by the jim-moser/zf2-validators-empty-or-plugin package., (*16)

jim-moser/zf2-validators-empty-or-test

Package containing unit tests for jim-moser/zf2-validators-empty-or package., (*17)

Depends directly on jim-moser/zf2-validators-empty-or, laminas/laminas-inputfilter, laminas/laminas-servicemanager, laminas/laminas-validator, and phpunit/phpunit., (*18)

jim-moser/zf2-validators-empty-or-plugin

This package adds a Module.php file and configuration file which are used to add configuration for the Laminas Framework 2 validator plugin manager. This configuration allows the plugin manager to return instances of the EmptyValidator, OrChain, and VerboseOrChain validators given strings containing their names., (*19)

Depends directly on jim-moser/zf2-validators-empty-or and laminas/laminas-modulemanager., (*20)

jim-moser/zf2-validators-empty-or-plugin-test

Package containing framework integration tests for jim-moser/zf2-validators-empty-or-plugin package. The tests verify that the added validators are available from the validator plugin manager., (*21)

Depends directly on jim-moser/zf2-validators-empty-or, jim-moser/zf2-validators-empty-or-plugin. phpunit/phpunit, laminas/laminas-i18n, laminas/laminas-loader, laminas/laminas-log, laminas/laminas-mvc, laminas/laminas-serializer, laminas/laminas-servicemanager, and laminas/laminas-view. , (*22)

Installation

Alternative 1: Installation with Composer

  1. For an existing Laminas Framework installation, move into the parent of the vendor directory. This directory should contain an existing composer.json file. For a new installation, move into the directory you would like to contain the vendor directory., (*23)

    $ cd <parent_path_of_vendor>    
  2. Run the following command which will update the composer.json file, install the zf2-validators-empty-or-plugin package and its dependencies into their respective directories under the vendor directory, and update the composer autoloading files., (*24)

    $ composer require jim-moser/zf2-validators-empty-or

Alternative 2: Manual Installation to Vendor Directory

If you would like to install the packages manually and use a Module.php file to configure autoloading instead of using Composer to configure autoloading, then use the jim-moser/zf2-validators-empty-or-plugin package instead of this package. Follow the installation instructions in the README.md file of that package., (*25)

The Versions

16/09 2016

dev-master

9999999-dev https://github.com/jim-moser/zf2-validators-empty-or

Logical OR validator chains and empty value validator for Zend Framework 2.

  Sources   Download

BSD-3-Clause

The Requires

 

validator validation zf2

16/09 2016

1.0.2

1.0.2.0 https://github.com/jim-moser/zf2-validators-empty-or

Logical OR validator chains and empty value validator for Zend Framework 2.

  Sources   Download

BSD-3-Clause

The Requires

 

validator validation zf2

15/09 2016

1.0.1

1.0.1.0 https://github.com/jim-moser/zf2-validators-empty-or

Logical OR validator chains and empty value validator for Zend Framework 2.

  Sources   Download

BSD-3-Clause

The Requires

 

validator validation zf2

14/09 2016

1.0.0

1.0.0.0 https://github.com/jim-moser/zf2-validators-empty-or

Logical OR validator chains and empty value validator for Zend Framework 2.

  Sources   Download

BSD-3-Clause

The Requires

 

validator validation zf2

01/09 2016

0.0.6

0.0.6.0 https://github.com/jim-moser/zf2-validators-empty-or

Logical OR validator chains and empty value validator for Zend Framework 2.

  Sources   Download

BSD-3-Clause

The Requires

 

validator validation zf2

25/08 2016

0.0.5

0.0.5.0 https://github.com/jim-moser/zf2-validators-empty-or

Logical OR validator chains and empty value validator for Zend Framework 2.

  Sources   Download

BSD-3-Clause

The Requires

 

validator validation zf2

23/08 2016

0.0.4

0.0.4.0 https://github.com/jim-moser/zf2-validators-empty-or

Logical OR validator chains and empty value validator for Zend Framework 2.

  Sources   Download

BSD-3-Clause

The Requires

 

validator validation zf2

09/08 2016

0.0.3

0.0.3.0 https://github.com/jim-moser/zf2-validators-empty-or

Logical OR validator chain and empty value validator for Zend Framework 2.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

validator validation zf2 module