Then we don't have to construct any validators.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* @return bool True if the mail address is valid, false otherwise
*/
public function validateMailAddress(string $email): bool {
+ if ($email === '') {
+ // Shortcut: empty addresses are never valid
+ return false;
+ }
$validator = new EmailValidator();
$validation = new RFCValidation();
['lukas@192.168.1.1', true],
['lukas@éxämplè.com', true],
['asdf', false],
+ ['', false],
['lukas@owncloud.org@owncloud.com', false],
];
}