2017 © Pedro Peláez
 

symfony-bundle validation-bundle

Symfony AntkowiakValidationBundle

image

antkowiak/validation-bundle

Symfony AntkowiakValidationBundle

  • Thursday, March 24, 2016
  • by antkowiak
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Installation

Step 1: Composer require

composer require antkowiak/validation-bundle dev-master

Step 2: Enable the bundle

new Antkowiak\ValidationBundle\AntkowiakValidationBundle()

Usage

$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
Example messages array:
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."
  ]
]

License

This bundle is released under the MIT license. See the complete license in the bundle:, (*1)

Resources/meta/LICENSE

The Versions

24/03 2016

dev-master

9999999-dev http://antkowiak.it/

Symfony AntkowiakValidationBundle

  Sources   Download

MIT

The Requires

  • php ^5.5.9|^7.0

 

by Patryk Antkowiak

validation