1/** 2 * @file 3 * Attaches behaviors for the Clientside Validation jQuery module. 4 */ 5(function ($) { 6 // Override clientside validation jquery validation options. 7 // We do this to display the error markup same as in inline_form_errors. 8 $(document).once('cvjquery').on('cv-jquery-validate-options-update', function (event, options) { 9 options.errorElement = 'strong'; 10 options.showErrors = function(errorMap, errorList) { 11 // First remove all errors. 12 for (var i in errorList) { 13 $(errorList[i].element).parent().find('.form-item--error-message').remove(); 14 } 15 16 // Show errors using defaultShowErrors(). 17 this.defaultShowErrors(); 18 19 // Wrap all errors with div.form-item--error-message. 20 $(this.currentForm).find('strong.error').each(function () { 21 if (!$(this).parent().hasClass('form-item--error-message')) { 22 $(this).wrap('<div class="form-item--error-message" role="alert"/>'); 23 } 24 }); 25 }; 26 }); 27})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.