Skip to content

Commit 2ea6fe0

Browse files
author
Aashutosh
committed
update apply() with custom changes
1 parent b10cb78 commit 2ea6fe0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

validating.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,12 @@ func (r *Rule) Apply(v *Validation) (stop bool) {
192192
v.AddError(field, r.validator, r.errorMessage(field, r.validator, v))
193193
}
194194

195-
if v.shouldStop() {
195+
// Customization: To validate all the fields we need to continue iterating rather stopping on single error.
196+
197+
// stop on error
198+
/*if v.shouldStop() {
196199
return true
197-
}
200+
}*/
198201
}
199202

200203
return false

0 commit comments

Comments
 (0)