form-validation.scss 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. @import '../../bootstrap-extended/include'; // Bootstrap includes
  2. @import '../../components/include'; // Components includes
  3. form {
  4. span.error {
  5. width: 100%;
  6. font-size: 0.857rem;
  7. }
  8. .error:not(input) {
  9. color: $danger;
  10. }
  11. input.error,
  12. input.error:focus {
  13. border-color: $danger !important;
  14. ~ .custom-control-label::before,
  15. ~ .custom-file-label {
  16. border-color: $danger !important;
  17. }
  18. ~ .custom-control-label {
  19. color: $danger;
  20. }
  21. }
  22. .form-group {
  23. .custom-control-input.error {
  24. cursor: pointer;
  25. & {
  26. ~ .custom-control-label:before {
  27. border-color: $danger !important;
  28. }
  29. }
  30. }
  31. }
  32. textarea.error {
  33. border-color: $danger !important;
  34. }
  35. .select2.error {
  36. + .select2-container--classic .select2-selection--single,
  37. + .select2-container--default .select2-selection--single,
  38. + .select2-container--classic .select2-selection--multiple,
  39. + .select2-container--default .select2-selection--multiple {
  40. border-color: $danger !important;
  41. }
  42. }
  43. }