symfony/Validator — pull request #7 by Dewos (2013-09-15 09:24:34+00:00)
Title: [Validator] Added isValid() getter

| Q | A
| ------------- | ---
| Bug fix? | [no]
| New feature? | [yes]
| BC breaks? | [no] (maybe the interface?)
| Deprecations? | [no]
| Tests pass? | [yes]
| Fixed tickets | [no]
| License | MIT

A shortcut for direct validation, with the same API of Form.

```php
// Before:
if($v->validate($entity)->count() === 0)
{
// Do something
}

// After:
if($v->validate($entity)->isValid())
{
// Do something
}