Form: add pseudo native form validation

This commit is contained in:
Simon Lehericey 2017-07-26 12:41:23 +02:00 committed by Mathieu Magnin
parent 509b378567
commit 2fd486c1a3
3 changed files with 20 additions and 0 deletions

View file

@ -58,6 +58,17 @@
max-width: 180px;
}
input:invalid,
textarea:invalid {
box-shadow: none;
}
input.touched:invalid,
textarea.touched:invalid {
border-color: $dark-red;
box-shadow: 0px 0px 5px $dark-red;
}
select,
.select2-selection {
// hack found here: https://stackoverflow.com/questions/1895476/how-to-style-a-select-dropdown-with-css-only-without-javascript