Download the PHP package etopian/validator-factory without Composer
On this page you can find all versions of the php package etopian/validator-factory. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download etopian/validator-factory
More information about etopian/validator-factory
Files in etopian/validator-factory
Package validator-factory
Short Description Standalone library to use Illuminate\Validation package outside the Laravel framework.
License MIT
Informations about the package validator-factory
ValidatorFactory
Standalone library to use the Illuminate\Validation package outside the Laravel framework.
Installation
From your terminal, run:
Usage
You need to create a new instance of the ValidatorFactory
class.
This will return an instance of Illuminate\Validation\Validator::class
.
You can learn more about the Laravel Validator in the official documentation website.
Customizing error messages
You can specify a custom translation root directory
Inside that directory you will need to create the following structure:
You can customize the structure above by specifying the following values when you create a new instance of the ValidatorFactory::class
If your plan is to use a custom rule object you would generally call the trans
helper inside your messages()
method when working inside of Laravel.
However you will not have access to the trans
helper outside of Laravel so you will need to use ValidatorFactory::trans($key)
instead.
All versions of validator-factory with dependencies
illuminate/translation Version ^5.6
illuminate/validation Version ^5.6