Add adds a validation error to the target.
(def Expression, format string, vals ...any)
| 169 | |
| 170 | // Add adds a validation error to the target. |
| 171 | func (verr *ValidationErrors) Add(def Expression, format string, vals ...any) { |
| 172 | verr.AddError(def, fmt.Errorf(format, vals...)) |
| 173 | } |
| 174 | |
| 175 | // AddError adds a validation error to the target. It "flattens" validation |
| 176 | // errors so that the recorded errors are never ValidationErrors themselves. |