Skip to content
Snippets Groups Projects
Commit db9ac138 authored by Yassine Doghri's avatar Yassine Doghri
Browse files

fix(input-component): unset required attribute to prevent rendering it when false

parent f74403bd
No related branches found
No related tags found
No related merge requests found
...@@ -20,6 +20,8 @@ class Input extends FormComponent ...@@ -20,6 +20,8 @@ class Input extends FormComponent
$this->attributes['class'] .= ' px-3 py-2'; $this->attributes['class'] .= ' px-3 py-2';
} }
unset($this->attributes['required']);
if ($this->required) { if ($this->required) {
$this->attributes['required'] = 'required'; $this->attributes['required'] = 'required';
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment