mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-31 16:37:27 -08:00
Fix validation messages for select2 inputs
This commit is contained in:
parent
8417fcb604
commit
67494c1b0b
|
@ -996,8 +996,8 @@ dir="{{ Helper::determineLanguageDirection() }}">
|
||||||
errorElement: 'span',
|
errorElement: 'span',
|
||||||
errorPlacement: function(error, element) {
|
errorPlacement: function(error, element) {
|
||||||
$(element).hasClass('select2') || $(element).hasClass('js-data-ajax')
|
$(element).hasClass('select2') || $(element).hasClass('js-data-ajax')
|
||||||
// If the element is a select2 then place the error above the input
|
// If the element is a select2 then append the error to the parent div
|
||||||
? element.parents('.required').append(error)
|
? element.parent('div').append(error)
|
||||||
// Otherwise place it after
|
// Otherwise place it after
|
||||||
: error.insertAfter(element);
|
: error.insertAfter(element);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue