Go to file
Henrique Moody 1da164a26e
Change how "Sf" rule works
Instead of creating the Symfony constraints itself "Sf" accepts an
instance of "Symfony\Component\Validator\Constraint".

Creating objects inside a rule, specially from an external library,
makes the rule too complex and also limits the possibilities with the
"Sf" rule since Symfony allows users to create complex validations (even
thought their API is not as simple as ours).

This commit also simplifies the way the messages are passed from Symfony
to the "Sf" when only one constraint has failed; instead of passing
the message of the whole constraint violation list, only the fist
constraint violation message it passed.

The problem that this rule will always have is that when using "Not" to
invert the validation we have a way to get a proper message since
Symfony Validator only return the result of constraints that failed.
That's something the Respect\Validation does in a similar way and to
change it a lot has to be changed.

These changes were checked in "symfony/validator" 4.0 and the version
was added to the "composer.json" file.

Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
2018-08-22 17:46:21 +02:00
docs Change how "Sf" rule works 2018-08-22 17:46:21 +02:00
library Change how "Sf" rule works 2018-08-22 17:46:21 +02:00
tests Change how "Sf" rule works 2018-08-22 17:46:21 +02:00
.docheader Add license check by file to build 2016-10-29 12:31:13 +02:00
.gitattributes Create ".gitattributes" file 2017-02-10 14:55:35 +01:00
.gitignore Update PHP-CS-Fixer settings 2016-10-30 10:39:23 +01:00
.php_cs Enforce the use of "@covers" annotation 2018-07-23 21:37:38 +02:00
.scrutinizer.yml Migrate to new PHP Analysis 2018-01-09 16:19:27 +01:00
.travis.yml Use Composer "--ignore-platform-reqs" on 7.3 build 2018-06-20 22:34:21 +02:00
CHANGELOG.md Update "CHANGELOG.md" file 2016-04-23 22:11:23 -03:00
composer.json Change how "Sf" rule works 2018-08-22 17:46:21 +02:00
CONTRIBUTING.md Update contribution guidelines 2018-01-07 14:53:12 +01:00
couscous.yml Add Google Analytics tracking ID to "couscous.yml" 2015-02-18 08:49:05 -02:00
LICENSE.md Update license to MIT 2018-03-03 19:06:38 +01:00
phpunit.xml.dist Apply contribution guidelines to "AbstractSearcher" 2018-01-19 21:41:34 +01:00
README.md Update "Installation" document 2017-03-28 11:35:48 +02:00

Respect\Validation

Build Status Scrutinizer Code Quality Code Coverage Latest Stable Version Total Downloads License

The most awesome validation engine ever created for PHP.

Table of contents