error($this->messageInvalid, $this->stringify($value)); return false; } if (!$this->empty && (string) $value === '0') { $this->error($this->messageEmpty); return false; } $regex = $this->empty ? '/^(0|(?!0)[0-9]+)$/' : '/^(?!0)\d+$/'; if (!preg_match($regex, $value) || bccomp($value, 0) == -1 || bccomp($value, ZBX_DB_MAX_ID) == 1 ) { $this->error($this->messageInvalid, $value); return false; } return true; } }