Download
Composer
Composer is the preferred method to install Flikore Validator. Simply add to your composer.json
:
{
"require": {
"flikore/validator": "dev-master"
}
}
Run composer install
, then include the autoload file in your project:
<?php
require_once 'vendor/autoload.php';
// Do validation stuff
Installing with Git
- Clone this repository in a folder on your project:
git clone https://github.com/flikore/validator.git vendor/flikore/validator
- Include the
autoload.php
file in the bootstrap for your project:
<?php
require_once 'vendor/flikore/validator/autoload.php';
// Do validation stuff
Submodule
An alternative is to create a submodule instead of cloning the repository. This way you don’t need to push this library to your own repository and can also update it more easily:
git submodule add https://github.com/flikore/validator.git vendor/flikore/validator
Download
You can also download the tarball (or the zipball) and set it up in one of your project folders.