Skip to content

Commit

Permalink
js: form-validation
Browse files Browse the repository at this point in the history
  • Loading branch information
vic4key committed Mar 6, 2024
1 parent 41b1568 commit 8342ce4
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions js/form-validation.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// Bootstrap Validator



// CSS
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-validator/0.5.3/css/bootstrapValidator.min.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.0/css/all.css"></link>



input[type="number"]::-webkit-outer-spin-button, input[type="number"]::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}

input[type="number"] {
-moz-appearance: textfield;
}

.bv-form .help-block {
width: 100%;
text-align: right;
margin-top: 0.3em;
margin-right: 0.3em;
color: red;
}

.form-control-feedback {
text-align: right;
position: relative;
float: right;
top: -27px;
left: -7px;
}



// JS
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-validator/0.5.3/js/bootstrapValidator.min.js"></script>

$("form").bootstrapValidator(
{
feedbackIcons:
{
required: "fa fa-asterisk",
valid: "fa fa-check",
invalid: "fa fa-times",
validating: "fa fa-refresh"
}
});



// Bootstrap 3+

0 comments on commit 8342ce4

Please sign in to comment.