RegisterValidation adds a validation with the given tag NOTES: - if the key already exists, the previous validation function will be replaced. - this method is not thread-safe it is intended that these all be registered prior to any validation
(tag string, fn Func, callValidationEvenIfNull ...bool)
| 219 | // - if the key already exists, the previous validation function will be replaced. |
| 220 | // - this method is not thread-safe it is intended that these all be registered prior to any validation |
| 221 | func (v *Validate) RegisterValidation(tag string, fn Func, callValidationEvenIfNull ...bool) error { |
| 222 | return v.RegisterValidationCtx(tag, wrapFunc(fn), callValidationEvenIfNull...) |
| 223 | } |
| 224 | |
| 225 | // RegisterValidationCtx does the same as RegisterValidation on accepts a FuncCtx validation |
| 226 | // allowing context.Context validation support. |