hazzard/validation
Larablocks Analysis
hazzard/validation works with Laravel 5 (latest release 1.0.1, Feb 3, 2016), which reached end of life: no more fixes, even for security.
Laravel 4 in earlier releases.
Recommendation checks
Not advisedNot advised: no release or commit in over 2 years.
- No release or commit in over 2 years
- Supports only Laravel 5, past end of life
- No release in the last 12 months (last: Mar 11, 2016)
- 8 downloads a month (needs 10,000)
- 2 GitHub stars (needs 100)
State
Likely abandoned- No release or commit in over 2 years.
- Last stable release: Mar 11, 2016.
- No releases in the last 12 months.
- First released: Aug 3, 2015.
- Monthly downloads: 8.
- 3 open issues on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Dec 1, 2026.
| Install | |
|---|---|
composer require hazzard/validation |
|
| Latest Version: | 1.0.1 |
| PHP: | >=5.4 |
| Laravel: | 5 |
| Older releases: | 4 |
| License: | MIT |
| Last Updated: | Oct 20, 2017 |
| Links: | GitHub · Packagist |
Illuminate Validation Outside Laravel
Installation
composer require illuminate/validation
composer require hazzard/validation
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:
$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.
The translator must implement Symfony\Component\Translation\TranslatorInterface.
$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.
Related Packages
Powerful PHP database abstraction layer (DBAL) with many features for database s...
Laravel Serializable Closure provides an easy and secure way to serialize closur...
Cli error handling for console/command-line PHP applications.
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 1.0.1 | >=5.4 | 5.0.*| | MIT | |
| 1.0.0 | >=5.4 | 5.0.*| | MIT | |
| 0.2.0 | >=5.3.0 | 4.1.*| | MIT | |
| 0.1.0 | >=5.3.0 | 4.1.* | MIT |