2017 © Pedro Peláez
 

library validation

Use Illuminate Validation outside Laravel.

image

hazzard/validation

Use Illuminate Validation outside Laravel.

  • Friday, March 11, 2016
  • by cretueusebiu
  • Repository
  • 2 Watchers
  • 2 Stars
  • 354 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 3 Forks
  • 3 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

Illuminate Validation Outside Laravel

Installation

composer require illuminate/validation, (*1)

composer require hazzard/validation, (*2)

Usage

use Hazzard\Validation\Validator;

$validator = new Validator;

// Set default language lines used by the translator.
$validator->setDefaultLines();

// Make instance available globally via static methods (optional).
$validator->setAsGlobal();

// Create a class alias (optional). 
$validator->classAlias();
Database Presence Verifier

Using the Illuminate Database Capsule set the database connection instance:, (*3)

$db = $capsule->getDatabaseManager();

$validator->setConnection($db);
Providing A Custom Translator

To provide a custom translator pass an instance of Illuminate\Container\Container with the translator bound to translator., (*4)

The translator must implement Symfony\Component\Translation\TranslatorInterface., (*5)

$container['translator'] = new CustomTranslator();

$validator = new Validator($container);
Using The Validator
$validator = Validator::make(
    ['name' => 'Dayle'],
    ['name' => 'required|min:5']
);

The rest is the same as Laravel., (*6)

The Versions

11/03 2016

dev-laravel4

dev-laravel4

Use Illuminate Validation outside Laravel.

  Sources   Download

MIT

The Requires

 

11/03 2016

0.2.0

0.2.0.0

Use Illuminate Validation outside Laravel.

  Sources   Download

MIT

The Requires

 

25/02 2016

0.1.0

0.1.0.0

Use Illuminate Validation outside Laravel.

  Sources   Download

MIT

The Requires

 

03/02 2016

dev-master

9999999-dev

Use Illuminate Validation outside Laravel.

  Sources   Download

MIT

The Requires

 

03/02 2016

1.0.1

1.0.1.0

Use Illuminate Validation outside Laravel.

  Sources   Download

MIT

The Requires

 

03/08 2015

1.0.0

1.0.0.0

Use Illuminate Validation outside Laravel.

  Sources   Download

MIT

The Requires