From ead22b395aa709ad08a8d09c257100094b229e34 Mon Sep 17 00:00:00 2001 From: sheychen Date: Sat, 28 Apr 2018 12:12:08 +0200 Subject: [PATCH] Add min max in html --- src/Input.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Input.php b/src/Input.php index bbcce32..de45efd 100644 --- a/src/Input.php +++ b/src/Input.php @@ -140,6 +140,8 @@ class Input extends Element{ (isset($this->data['type']) ? 'type="'.$this->data['type'].'" ' : ''). (isset($this->data['title']) ? 'title="'.$this->data['title'].'" ' : ''). (isset($this->data['pattern']) ? 'pattern="'.$this->data['pattern'].'" ' : ''). + (isset($this->data['min']) ? 'min="'.$this->data['min'].'" ' : ''). + (isset($this->data['max']) ? 'max="'.$this->data['max'].'" ' : ''). (isset($this->data['minlength']) ? 'minlength="'.$this->data['minlength'].'" ' : ''). (isset($this->data['maxlength']) ? 'maxlength="'.$this->data['maxlength'].'" ' : ''). (isset($this->data['required']) && $this->data['required'] == true ? 'required ' : '').