Skip to content

Commit bc4f1a1

Browse files
committed
✔ Fixed new HTML5 attrs at input
1 parent f051726 commit bc4f1a1

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,10 @@ $(()=>{
467467
| value | Input value | null | string |
468468
| disabled | is disabled? | false | boolean |
469469
| required | is required? | false | boolean |
470+
| step | HTML Attr: step | false | int |
471+
| max | HTML Attr: max | false | int |
472+
| maxlength | HTML Attr: maxlength | false | int |
473+
| pattern | HTML Attr: pattern | false | regex |
470474

471475
#### INPUT-FILE
472476
**REQUIRES**

src/resources/components/input.blade.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,18 @@
22
<label for="{{$id}}">{{$label}}</label>
33
<input type="{{$type}}" class="{{$inputclass}} form-control @error($name) is-invalid @enderror"
44
id="{{$id}}" name="{{$name}}" placeholder="{{$placeholder}}"
5-
step="{{$step}}" max="{{$max}}" maxlength="{{$maxlength}}" pattern="{{$pattern}}"
5+
@if(!is_null($step))
6+
step="{{$step}}"
7+
@endif
8+
@if(!is_null($max))
9+
max="{{$max}}"
10+
@endif
11+
@if(!is_null($maxlength))
12+
maxlength="{{$maxlength}}"
13+
@endif
14+
@if(!is_null($pattern))
15+
pattern="{{$pattern}}"
16+
@endif
617
value="{{$value}}"
718
{{($required) ? 'required' : '' }}
819
{{($disabled) ? 'disabled' : '' }}>

0 commit comments

Comments
 (0)