Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Validation Bundle Laravel Package

antkowiak/validation-bundle

View on GitHub
Deep Wiki
Context7

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:

Resources/meta/LICENSE
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver