31 lines
495 B
Markdown
31 lines
495 B
Markdown
|
UPGRADE FROM 5.1 to 5.2
|
||
|
=======================
|
||
|
|
||
|
Validator
|
||
|
---------
|
||
|
|
||
|
* Deprecated the `allowEmptyString` option of the `Length` constraint.
|
||
|
|
||
|
Before:
|
||
|
|
||
|
```php
|
||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||
|
|
||
|
/**
|
||
|
* @Assert\Length(min=5, allowEmptyString=true)
|
||
|
*/
|
||
|
```
|
||
|
|
||
|
After:
|
||
|
|
||
|
```php
|
||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||
|
|
||
|
/**
|
||
|
* @Assert\AtLeastOneOf({
|
||
|
* @Assert\Blank(),
|
||
|
* @Assert\Length(min=5)
|
||
|
* })
|
||
|
*/
|
||
|
```
|