Download the PHP package intervention/validation without Composer

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

All versions of validation with dependencies

Informations about the package validation

Intervention Validation

Intervention Validation is an extension library for Laravel's own validation system. The package adds rules to validate data like IBAN, BIC, ISBN, creditcard numbers and more.

Latest Version build Monthly Downloads

Installation

You can install this package quick and easy with Composer.

Require the package via Composer:

$ composer require intervention/validation

Laravel integration

The Validation library is built to work with the Laravel Framework (>=7). It comes with a service provider, which will be discovered automatically and registers the validation rules into your installation. The package provides 30 additional validation rules including error messages, which can be used like Laravel's own validation rules.

Changing the error messages:

Add the corresponding key to /resources/lang/<language>/validation.php like this:

Or add your custom messages directly to the validator like described in the docs.

Standalone usage

It is also possible to use this library without the Laravel framework. You won't have the Laravel facades available, so make sure to use Intervention\Validation\Validator for your calls.

Available Rules

The following validation rules are available with this package.

Base64 encoded string

The field under validation must be Base64 encoded.

public Intervention\Validation\Rules\Base64::__construct()

Business Identifier Code (BIC)

Checks for a valid Business Identifier Code (BIC).

public Intervention\Validation\Rules\Bic::__construct()

Camel case string

The field under validation must be a formated in Camel case.

public Intervention\Validation\Rules\Camelcase::__construct()

Classless Inter-Domain Routing (CIDR)

Check if the value is a Classless Inter-Domain Routing notation (CIDR).

public Intervention\Validation\Rules\Cidr::__construct()

Creditcard Number

The field under validation must be a valid creditcard number.

public Intervention\Validation\Rules\Creditcard::__construct()

Data URI scheme

The field under validation must be a valid Data URI.

public Intervention\Validation\Rules\DataUri::__construct()

Domain name

The field under validation must be a well formed domainname.

public Intervention\Validation\Rules\Domainname::__construct()

European Article Number (EAN)

Checks for a valid European Article Number.

public Intervention\Validation\Rules\Ean::__construct(?int $length = null)

Parameters

length

Optional integer length (8 or 13) to check only for EAN-8 or EAN-13.

Global Trade Item Number (GTIN)

Checks for a valid Global Trade Item Number.

public Intervention\Validation\Rules\Gtin::__construct(?int $length = null)

Parameters

length

Optional integer length to check only for certain types (GTIN-8, GTIN-12, GTIN-13 or GTIN-14).

Hexadecimal color code

The field under validation must be a valid hexadecimal color code.

public Intervention\Validation\Rules\HexColor::__construct(?int $length = null)

Parameters

length

Optional length as integer to check only for shorthand (3 characters) or full hexadecimal (6 characters) form.

Text without HTML

The field under validation must be free of any html code.

public Intervention\Validation\Rules\HtmlClean::__construct()

International Bank Account Number (IBAN)

Checks for a valid International Bank Account Number (IBAN).

public Intervention\Validation\Rules\Iban::__construct()

International Mobile Equipment Identity (IMEI)

The field under validation must be a International Mobile Equipment Identity (IMEI).

public Intervention\Validation\Rules\Imei::__construct()

International Standard Book Number (ISBN)

The field under validation must be a valid International Standard Book Number (ISBN).

public Intervention\Validation\Rules\Isbn::__construct(?int $length = null)

Parameters

length

Optional length parameter as integer to check only for ISBN-10 or ISBN-13.

International Securities Identification Number (ISIN)

Checks for a valid International Securities Identification Number (ISIN).

public Intervention\Validation\Rules\Isin::__construct()

International Standard Serial Number (ISSN)

Checks for a valid International Standard Serial Number (ISSN).

public Intervention\Validation\Rules\Issn::__construct()

JSON Web Token (JWT)

The given value must be a in format of a JSON Web Token.

public Intervention\Validation\Rules\Jwt::__construct()

Kebab case string

The given value must be formated in Kebab case.

public Intervention\Validation\Rules\Kebabcase::__construct()

Lower case string

The given value must be all lower case letters.

public Intervention\Validation\Rules\Lowercase::__construct()

Luhn algorithm

The given value must verify against its included Luhn algorithm check digit.

public Intervention\Validation\Rules\Luhn::__construct()

Media (MIME) type

Checks for a valid Mime Type (Media type).

public Intervention\Validation\Rules\MimeType::__construct()

Postal Code

The field under validation must be a postal code of the given country.

public Intervention\Validation\Rules\Postalcode::__construct(string $countrycode)

Parameters

countrycode

Country code in ISO-639-1 format.

Postal Code (static instantiation)

public static Intervention\Validation\Rules\Postalcode::countrycode(string $countrycode): Postalcode

Parameters

countrycode

Country code in ISO-639-1 format.

Postal Code (static instantiation with callback)

public static Intervention\Validation\Rules\Postalcode::resolve(callable $callback): Postalcode

Parameters

callback

Callback to resolve ISO-639-1 country code from other source.

Postal Code (static instantiation with reference)

public static Intervention\Validation\Rules\Postalcode::reference(string $reference): Postalcode

Parameters

reference

Reference key to get ISO-639-1 country code from other data in validator.

Semantic Version Number

The field under validation must be a valid version numbers using Semantic Versioning.

public Intervention\Validation\Rules\SemVer::__construct()

SEO-friendly short text (Slug)

The field under validation must be a user- and SEO-friendly short text.

public Intervention\Validation\Rules\Slug::__construct()

Snake case string

The field under validation must formated as Snake case text.

public Intervention\Validation\Rules\Snakecase::__construct()

Title case string

The field under validation must formated in Title case.

public Intervention\Validation\Rules\Titlecase::__construct()

Universally Unique Lexicographically Sortable Identifier (ULID)

The field under validation must be a valid Universally Unique Lexicographically Sortable Identifier.

public Intervention\Validation\Rules\Ulid::__construct()

Upper case string

The field under validation must be all upper case.

public Intervention\Validation\Rules\Uppercase::__construct()

Username

The field under validation must be a valid username. Consisting of alpha-numeric characters, underscores, minus and starting with a alphabetic character. Multiple underscore and minus chars are not allowed. Underscore and minus chars are not allowed at the beginning or end.

public Intervention\Validation\Rules\Username::__construct()

License

Intervention Validation is licensed under the MIT License.


Version
Requires php Version ^7.3|^7.4|^8.0
illuminate/validation Version ~7|~8|~9

The package intervention/validation contains the following files

Loading the files please wait ....