Download the PHP package igniphp/validation without Composer

On this page you can find all versions of the php package igniphp/validation. 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 validation

Igni logoBuild Status

Igni Validation

Licensed under MIT License.

Igni validation is simple, lightweight and extensible validation library.

Installation

Introduction

Basic example

Getting error information

Allows to validate complex arrays

API

Validation list

Assertion::alnum(int $min = null, int $max = null)

Creates validator that checks if passed value contains only digits and letters.

Parameters

Example

Assertion::alpha(int $min = null, int $max = null)

Creates validator that checks if passed value contains only letters.

Parameters

Example

Assertion::boolean()

Creates validator that checks if passed value is valid boolean expression.

Example

Assertion::chain(Rule ...$rules)

Creates validator that uses other validators to perform multiple validations on passed value.

Example

Assertion::contains(string $value)

Creates validator that checks if passed string is contained in the validated string.

Example

Assertion::date(string $format = null, $min = null, $max = null)

Creates validator that checks if passed value is valid date.

Parameters

Example

Assertion::email()

Creates validator that checks if passed value is valid email address.

Example

Assertion::each(Validator $validator)

Creates validator that checks if each item in passed set can be successfully validated against $validator.

Parameters

Example

Assertion::falsy()

Creates validator that checks if passed value is valid falsy expression;

Example

Assertion::group(array $validatorsHash)

Creates validator with key/value hash that validates other hashes.

Example

Assertion::regex(string $pattern)

Creates validator that checks if passed string matches the pattern.

Example

Assertion::truthy()

Creates validator that checks if passed value is valid truthy expression;

Example

Assertion::text(int $minLength = null, int $maxLength = null)

Creates validator that checks if passed value is string.

Parameters

Example

Assertion::in(...$values)

Creates validator that checks if passed value exists in defined list of values.

Example

Assertion::integer(int $min = null, int $max = null)

Creates validator that checks if passed value is valid integer expression.

Parameters

Example

Assertion::ip()

Creates validator that checks if passed value is valid ip address.

Example

Assertion::ipv4()

Creates validator that checks if passed value is valid ip v4 address.

Example

Assertion::ipv6()

Creates validator that checks if passed value is valid ip v6 address.

Example

Assertion::number(int $min = null, int $max = null)

Creates validator that checks if passed value is valid number expression.

Parameters

Example

Assertion::uuid()

Creates validator that checks if passed value is valid uuid.

Example

Assertion::uri()

Creates validator that checks if passed value is valid uri string.

Example

Assertion::url()

Creates validator that checks if passed value is valid url string.

Example

Assertion::text()

Creates validator that accepts every non empty string.

Assertion::group(array $validators)

Creates validator that validates passed value by group of defined validators.

Example

Creating custom validator

To create custom validator we have to simply extend \Igni\Validation\Assertion class, please consider following example:

That's all folks!


All versions of validation with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1.0
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 igniphp/validation contains the following files

Loading the files please wait ....