Bug #64970
empty email address should return false in EmailAddressValidator
Status: | Rejected | Start date: | 2015-02-10 | |
---|---|---|---|---|
Priority: | Must have | Due date: | ||
Assigned To: | Bastian Waidelich | % Done: | 0% |
|
Category: | Validation | |||
Target version: | TYPO3 Flow Base Distribution - 2.x | |||
PHP Version: | Complexity: | no-brainer | ||
Has patch: | No | Affected Flow version: | Flow 2.0.0 |
Description
I expected that an empty email adress in EmailAddressValidator, would return false, but that will not be checked until now.
History
#1 Updated by Bastian Waidelich 6 months ago
- Status changed from New to Rejected
- Assigned To set to Bastian Waidelich
Hey Tobias,
sorry for rejecting your ticket, but this is done on purpose, because it allows you to have optional properties that have to be a valid email address if specified. If you require a property, use the NotEmpty validator - and if it should be required and a valid email use both.
BTW: For custom validators you can manipulate this behavior via @acceptsEmptyValues (see https://git.typo3.org/Packages/TYPO3.Flow.git/blob/HEAD:/Classes/TYPO3/Flow/Validation/Validator/AbstractValidator.php)
BTW2: This issue tracker is deprecated for Flow/Neos please use https://jira.typo3.org/ in the future