Download the PHP package gajus/vlad without Composer

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

Vlad

Build Status Coverage Status Latest Stable Version

Input validation library, that has inbuilt error messages that are translatable, validators that are easy to extend, and that has easy to understand test declaration syntax.

Succinct Test Declaration

Test is composed of assertions about the input.

Limit the Assessment Scope

Note that assertions are done against selector name, not the actual value. You can limit test to specific assertions at the time of the assessment:

Extendable Validation Rules

Vlad has inbuilt validators. It is easy to write custom validators. You can request new validators to be added to the core package. Validators benefit from the translator interface.

Vlad does not encourage inline boolean validation expressions.

Inbuilt Validation Rules

Validator Description
String Validate that input is a string.
Regex Validate that input is matched using a regular expression.
Date Validates that string can be parsed using a date format.
RangeMinInclusive Validate that a numeric input is at least of the given size (inclusive).
RangeMinExclusive Validate that a numeric input is at least of the given size (exclusive).
RangeMaxInclusive Validate that a numeric input is at most of the given size (inclusive).
RangeMaxExclusive Validate that a numeric input is at most of the given size (exclusive).
NotEmpty Validate that input value is not empty.
Length Validate that input string representation is of a specific length.
Integer Validate that input is an integer.
LengthMin Validate that input string representation is not shorter than the specified length.
LengthMax Validate that input string representation is not longer than the specified length.
In Validate that input value is in the haystack.
Email Validate that input value is syntactically valid email address.

Writing a Custom Validator

Each validator is a class that extends Gajus\Vlad\Validator. Validators that are not part of the Vlad package must be under a namespace.

In the test declaration, custom validator is referred to using the full (namespaced) class name.

Multilingual

Translator allows to overwrite default error messages and give input names.

In addition to the provided (below) use cases of the translator, you can extend Gajus\Vlad\Translator with your own functionality (e.g. importing translations from a file or database).

Input name

In most cases, you do not need to provide input name at all. Vlad will derive English name from the selector, e.g. foo[bar_tar_id] will come out as "Foo Bar Tar".

You can translate input names.

The above will produce the following error message:

Bar Tar is empty.

Validator Message

Validators have inbuilt English error messages. You can overwrite them like this:

Foo Bar cannot be left empty.

Assertion Error Message

Individual assertions can overwrite the error messages.

Installation

Vlad uses Composer to install and update:

Todo

Alternatives


All versions of vlad with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
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 gajus/vlad contains the following files

Loading the files please wait ....