Commit 4ce1908a authored by Carsten  Rose's avatar Carsten Rose
Browse files

Merge remote-tracking branch 'origin/B8091CheckBoxRequired' into B8091CheckBoxRequired

parents 5306e1cd 168741ef
Pipeline #2800 passed with stages
in 2 minutes and 38 seconds
......@@ -33,7 +33,7 @@
// ==========================
function getValue($el) {
return $el.is('[type="checkbox"]') ? !!$('[name="' + $el.attr('name') + '"]:checked').length :
return $el.is('[type="checkbox"]') ? $el.prop('checked') :
$el.is('[type="radio"]') ? !!$('[name="' + $el.attr('name') + '"]:checked').length :
$el.is('select[multiple]') ? ($el.val() || []).length :
$el.val()
......@@ -49,7 +49,7 @@
this.update()
this.$element.on('input.bs.validator change.bs.validator focusout.bs.validator', $.proxy(this.onInput, this))
this.$element.on('focusout.bs.validator', $.proxy(this.onInput, this))
this.$element.on('submit.bs.validator', $.proxy(this.onSubmit, this))
this.$element.on('reset.bs.validator', $.proxy(this.reset, this))
......@@ -57,7 +57,7 @@
var $this = $(this)
var target = $this.attr('data-match')
$(target).on('input.bs.validator', function (e) {
$(target).on('focusout.bs.validator', function (e) {
getValue($this) && $this.trigger('input.bs.validator')
})
})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment