From 8342ce4e0f1bf9ea10328e6c375edc827bf2a608 Mon Sep 17 00:00:00 2001 From: Vic P Date: Thu, 7 Mar 2024 00:26:35 +0700 Subject: [PATCH] js: form-validation --- js/form-validation.txt | 54 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 js/form-validation.txt diff --git a/js/form-validation.txt b/js/form-validation.txt new file mode 100644 index 0000000..bbcf274 --- /dev/null +++ b/js/form-validation.txt @@ -0,0 +1,54 @@ +// Bootstrap Validator + + + +// CSS + + + + + +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 + + +$("form").bootstrapValidator( +{ + feedbackIcons: + { + required: "fa fa-asterisk", + valid: "fa fa-check", + invalid: "fa fa-times", + validating: "fa fa-refresh" + } +}); + + + +// Bootstrap 3+ \ No newline at end of file