Skip to content

Commit

Permalink
Merge pull request #15944 from marcusmoore/bug/required-display-for-s…
Browse files Browse the repository at this point in the history
…elects
  • Loading branch information
snipe authored Dec 12, 2024
2 parents 4bd6c21 + 67494c1 commit f089d1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resources/views/layouts/default.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -996,8 +996,8 @@
errorElement: 'span',
errorPlacement: function(error, element) {
$(element).hasClass('select2') || $(element).hasClass('js-data-ajax')
// If the element is a select2 then place the error above the input
? element.parents('.required').append(error)
// If the element is a select2 then append the error to the parent div
? element.parent('div').append(error)
// Otherwise place it after
: error.insertAfter(element);
},
Expand Down

0 comments on commit f089d1f

Please sign in to comment.