Skip to content

Commit

Permalink
fix: textarea validation icon
Browse files Browse the repository at this point in the history
  • Loading branch information
astagi committed Jan 12, 2023
1 parent 4d81f6c commit 94d979c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/esempi/form/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,15 @@ <h2>Campi input</h2>
</div>
</div>

<div class="row">
<div class="col-12">
<div class="form-group">
<label for="description">Testo descrizione</label>
<textarea id="description" rows="3"></textarea>
</div>
</div>
</div>

<div class="row mb-4">
<div class="col-12">
<h2>Autocomplete</h2>
Expand Down Expand Up @@ -404,6 +413,12 @@ <h2>File</h2>
errorMessage: 'Questo campo è richiesto',
},
])
.addField('#description', [
{
rule: 'required',
errorMessage: 'Questo campo è richiesto'
},
])
.addField('#toggleEsempio1a', [
{
rule: 'required',
Expand Down
7 changes: 7 additions & 0 deletions src/scss/custom/_just-validate.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
padding-right: calc(1.5em + 0.75rem) !important;
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%2300cc85' viewBox='0 0 192 512'%3E%3Cpath d='M435.848 83.466L172.804 346.51l-96.652-96.652c-4.686-4.686-12.284-4.686-16.971 0l-28.284 28.284c-4.686 4.686-4.686 12.284 0 16.971l133.421 133.421c4.686 4.686 12.284 4.686 16.971 0l299.813-299.813c4.686-4.686 4.686-12.284 0-16.971l-28.284-28.284c-4.686-4.686-12.284-4.686-16.97 0z'/%3E%3C/svg%3E");
}
textarea {
&.just-validate-success-field {
background-position: right 0.2rem !important;
background-repeat: no-repeat !important;
background-size: 28px 16px !important;
}
}
input[type='date'],
input[type='file'],
input[type='text'] {
Expand Down

0 comments on commit 94d979c

Please sign in to comment.