Download the PHP package solbianca/validator without Composer

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

PHP Validator

This is an easy to use and customisable PHP validator.

Note: This package is under development and not recommended for production.

Build Status Scrutinizer Code Quality Maintainability

Installing

Install via composer

`

or add to composer.json

Basic usage

Adding custom rules

Adding custom rules is simple. It can be any callable or object which implement SolBianca\Validator\Interfaces\RuleInterface

If the callable returns false, the rule fails.

Rewrite rules

Validator have useful default rules as int, required and many more. You can rewrite any rule by your own.

Adding custom error messages

You can add custom error messages for any rule

Adding rule messages in bulk

Using Field Aliases

Field Aliases helps you format any error messages without showing weird form names or the need to create a custom error.

Rules

Array

If the value is an array.

``

Between

Checks if the value is within the intervals defined. This check is inclusive, so 5 is between 5 and 10.

``

Bool

If the value is a boolean.

``

Email

If the value is a valid email.

``

Int

If the value is an integer, including numbers within strings. 1 and '1' are both classed as integers.

``

Ip

If the value is a valid IP address.

``

Matches

Checks if one given input matches the other. For example, checking if password matches password_confirm.

``

Max

Check if string length is less than or equal to given int. To check the size of a number, pass the optional number option.

``

Mix

Check if string length is greater than or equal to given int. To check the size of a number, pass the optional number option.

``

Number

If the value is a number, including numbers within strings.

Numeric strings consist of optional sign, any number of digits, optional decimal part and optional exponential part. Thus +0123.45e6 is a valid numeric value. Hexadecimal (e.g. 0xf4c3b00c), Binary (e.g. 0b10100111001), Octal (e.g. 0777) notation is allowed too but only without sign, decimal and exponential part.

``

Regex

If the given input has a match for the regular expression given.

``

Required

If the value is present.

``

Url

If the value is formatted as a valid URL.

``


All versions of validator with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
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 solbianca/validator contains the following files

Loading the files please wait ....