Commits

bro...@bcc190cf-cafb-0310-a4f2-bffc1f526a37  committed 883fedd

newforms-admin: Fixed #5873 -- When a validation error occurs in a fieldset that is collapsed properly idenitfy it so it uncollapses to reveal the error. Thanks Jonas for the patch and Ariel Calzada for the report.

  • Participants
  • Parent commits 94056d3
  • Branches newforms-admin

Comments (0)

Files changed (1)

File django/contrib/admin/media/js/admin/CollapsedFieldsets.js

         // Returns true if any fields in the fieldset have validation errors.
         var divs = fs.getElementsByTagName('div');
         for (var i=0; i<divs.length; i++) {
-            if (divs[i].className.match(/\berror\b/)) {
+            if (divs[i].className.match(/\berrors\b/)) {
                 return true;
             }
         }