mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-28 01:29:05 +01:00
Do not try to validate empty strings as email. If it's required but empty, give the required validation message.
This commit is contained in:
parent
4311eebdc9
commit
46389e72f7
@ -189,7 +189,7 @@ class Taglist extends Etemplate\Widget
|
||||
}
|
||||
else
|
||||
{
|
||||
if(str_contains($this->type, 'email') && !preg_match(Url::EMAIL_PREG, $val) &&
|
||||
if($val !== '' && str_contains($this->type, 'email') && !preg_match(Url::EMAIL_PREG, $val) &&
|
||||
!($this->attrs['domainOptional'] && preg_match(Taglist::EMAIL_PREG_NO_DOMAIN, $val)) &&
|
||||
// Allow merge placeholders. Might be a better way to do this though.
|
||||
!preg_match('/{{.+}}|\$\$.+\$\$/', $val)
|
||||
|
Loading…
Reference in New Issue
Block a user