Bug #64970

empty email address should return false in EmailAddressValidator

Added by Tobias Braumann almost 7 years ago. Updated almost 7 years ago.

Status:
Rejected
Priority:
Must have
Category:
Validation
Start date:
2015-02-10
Due date:
% Done:

0%

Estimated time:
PHP Version:
Has patch:
No
Complexity:
no-brainer

Description

I expected that an empty email adress in EmailAddressValidator, would return false, but that will not be checked until now.

#1

Updated by Bastian Waidelich almost 7 years ago

  • Status changed from New to Rejected
  • Assignee 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

Also available in: Atom PDF