Skip to content

Commit

Permalink
chore(docs): add percentage to form example
Browse files Browse the repository at this point in the history
  • Loading branch information
astagi committed Dec 7, 2023
1 parent 6290674 commit 7d14b24
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions docs/esempi/form/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,23 @@ <h2>Campi input</h2>
</span>
</div>
</div>
<div class="col-12 col-md-4">
<div class="form-group">
<label for="perc_input_group" class="input-number-label active">Percentuale</label>
<div class="input-group input-number input-number-percentage">
<span class="input-group-text fw-semibold">%</span>
<input type="number" class="form-control" data-bs-input id="perc_input_group" name="perc_input_group" value="80" min="80" max="100" step="any" />
<span class="input-group-text align-buttons flex-column">
<button class="input-number-add">
<span class="visually-hidden">Aumenta del 10%</span>
</button>
<button class="input-number-sub">
<span class="visually-hidden">Diminuisci del 10%</span>
</button>
</span>
</div>
</div>
</div>
</div>

<div class="row">
Expand Down Expand Up @@ -381,6 +398,17 @@ <h2>File</h2>
errorMessage: 'Deve essere maggiore di 3.50',
}
])
.addField('#perc_input_group', [
{
rule: 'required',
errorMessage: 'Questo campo è richiesto',
},
{
rule: 'minNumber',
value: 80,
errorMessage: 'Deve essere maggiore di 80',
}
])
.addField('#age', [
{
rule: 'required',
Expand Down

0 comments on commit 7d14b24

Please sign in to comment.