Download the PHP package jim-moser/zf2-validators-empty-or without Composer

On this page you can find all versions of the php package jim-moser/zf2-validators-empty-or. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package zf2-validators-empty-or

Overview

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

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

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.

VerboseOrChain serves the same purpose as OrChain but provides added validation failure messages.

See the comments within the source code of the validators for more detailed information on each of them.

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.

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.

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.

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

Dependencies

This package depends directly on code and classes only from laminas/laminas-validator and laminas/laminas-stdlib.

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.

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.

$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.

This package has the fewest dependencies. Depends directly on laminas/laminas-validator and laminas/laminas-stdlib.

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

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.

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

Package containing unit tests for jim-moser/zf2-validators-empty-or package.

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

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.

Depends directly on jim-moser/zf2-validators-empty-or and laminas/laminas-modulemanager.

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.

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.

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.

    $ 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.

    $ 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.


All versions of zf2-validators-empty-or with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.3
laminas/laminas-validator Version ^2
laminas/laminas-stdlib Version ^2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package jim-moser/zf2-validators-empty-or contains the following files

Loading the files please wait ....