error($this->messageInvalid, $this->stringify($value)); return false; } if (zbx_empty($value)) { if ($this->empty) { return true; } else { $this->error($this->messageEmpty); return false; } } if ($this->maxLength && mb_strlen($value) > $this->maxLength) { $this->error($this->messageMaxLength, $value, $this->maxLength); return false; } if ($this->regex && !zbx_empty($value) && !preg_match($this->regex, $value)) { $this->error($this->messageRegex, $value); return false; } return true; } }