« Previous | Next » 

Revision 9b627954

ID9b627954f289d793b808db2ac19edc6a04c25426

Added by Bastian Waidelich over 9 years ago

[!!!][BUGFIX] Validators should allow empty values

Currently most of the provided validators do not accept empty
values.
This makes it impossible to have an optional email address
property for example (without using the disjunction validator).

This change adjusts all Validators to consider empty values
(NULL or an empty string) valid.

This is a breaking change if you expected the previous behavior.
In order to make a property required you now need to add the
NotEmptyValidator explicitly!

E.g.:
previously:

/** * @FLOW3\Validate(type="EmailAddress")
*/
protected $propertyToValidate;

Now:
/** * @FLOW3\Validate(type="NotEmpty") * @FLOW3\Validate(type="EmailAddress")
*/
protected $propertyToValidate;

Change-Id: I3a2b6df09573939d430c2aa28ef5d8919815b955
Fixes: #33300
Releases: 1.1

  • added
  • modified
  • copied
  • renamed
  • deleted