@@ -63,7 +63,10 @@
<div class="form-group">
<label class="col-lg-3 control-label">Age</label>
<div class="col-lg-2">
- <input type="text" class="form-control" name="age" max="100" required data-bv-lessthan-inclusive="true" data-bv-lessthan-message="The input must be less than 100" />
+ <input type="text" class="form-control" name="age"
+ min="10" required data-bv-greaterthan-inclusive="false" data-bv-greaterthan-message="The input must be greater than or equal to 10"
+ max="100" required data-bv-lessthan-inclusive="true" data-bv-lessthan-message="The input must be less than 100"
+ />
</div>
@@ -1135,6 +1135,19 @@
}(window.jQuery));
;(function($) {
$.fn.bootstrapValidator.validators.greaterThan = {
+ html5Attributes: ['message', 'value', 'inclusive'],
+
+ enableByHtml5: function($field) {
+ var min = $field.attr('min');
+ if (min) {
+ return {
+ value: min
+ };
+ }
+ return false;
+ },
/**
* Return true if the input value is greater than or equals to given number
*
@@ -1,5 +1,18 @@
(function($) {