File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
src/groovy/org/codehaus/groovy/grails/plugins/web/taglib Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,12 @@ class ValidationTagLib {
7474 if (errors) {
7575 if (attrs[' field' ]) {
7676 if (errors. hasFieldErrors(attrs[' field' ])) {
77+ def e = errors. getFieldErrors(attrs[' field' ])
78+ def errorArgs = e. arguments[0 ]
79+
80+ if (i. class == errorArgs[1 ]) {
81+ out << body()
82+ }
7783 out << body()
7884 }
7985 }
@@ -124,13 +130,20 @@ class ValidationTagLib {
124130 if (attrs[' field' ]) {
125131 if (errors. hasFieldErrors(attrs[' field' ])) {
126132 errors. getFieldErrors( attrs[" field" ] ). each {
127- out << body(it)
133+ def args = it. arguments
134+
135+ if (i. class == args[1 ]) {
136+ out << body(it)
137+ }
128138 }
129139 }
130140 }
131141 else {
132142 errors. allErrors. each {
133- out << body( it )
143+ def errorArgs = it. arguments
144+ if (i. class == errorArgs[1 ]) {
145+ out << body( it )
146+ }
134147 }
135148 }
136149 }
You can’t perform that action at this time.
0 commit comments