value, FILTER_VALIDATE_EMAIL)) { $this->valid = false; $this->errors[] = $this->getLabel() . " is not a valid email address."; } return $this->valid; } public function generateHtml(): string { $id = "id='".$this->getId()."'"; $name = "name='".$this->getName()."'"; $value = !is_null($this->value) ? "value='".$this->value."'" : ""; $lock = $this->lock ? "disabled" : ""; $placeholder = !is_null($this->placeholder) ? "placeholder='".$this->placeholder."'" : ""; $maxLength = $this->maxLength > 0 ? "maxlength='".$this->maxLength."'" : ""; $minLength = $this->minLength > 0 ? "minlength='".$this->minLength."'" : ""; $class = "class='".implode(" ", $this->classNames)."'"; return ""; } }