composer require antkowiak/validation-bundle dev-master
new Antkowiak\ValidationBundle\AntkowiakValidationBundle()
$validator = $this->get('antkowiak.validator');
$object = new Object(); //Object with assert on fields.
$object->setEmail('1');
$validator->isValid($object); //boolean
$validator->getMessages($object); //array with messages
array:2 [
"user" => array:1 [
0 => "Ta wartość nie powinna być pusta."
]
"name" => array:2 [
0 => "Ta wartość nie jest prawidłowym adresem email."
1 => "Ta wartość jest zbyt krótka. Powinna mieć 3 lub więcej znaków."
]
]
This bundle is released under the MIT license. See the complete license in the bundle:
Resources/meta/LICENSE
How can I help you explore Laravel packages today?