From 58cceaaec204e285bbcf42ee90a3757cf11b9905 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sun, 11 Feb 2018 15:11:53 +0100 Subject: [PATCH] Fix text validation in `TextFormField` See #2509 --- .../files/lib/system/form/builder/field/TextFormField.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/form/builder/field/TextFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/TextFormField.class.php index 83b621eef9..26e1c27167 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/TextFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/TextFormField.class.php @@ -44,7 +44,7 @@ class TextFormField extends AbstractFormField implements II18nFormField, IMaximu } } else { - if ($this->isRequired() && $this->getValue() === '') { + if ($this->isRequired() && ($this->getValue() === null || $this->getValue() === '')) { $this->addValidationError(new FormFieldValidationError('empty')); } else { -- 2.20.1