RegisterStructValidation registers a StructLevelFunc against a number of types. NOTE: - this method is not thread-safe it is intended that these all be registered prior to any validation
(fn StructLevelFunc, types ...interface{})
| 252 | // NOTE: |
| 253 | // - this method is not thread-safe it is intended that these all be registered prior to any validation |
| 254 | func (v *Validate) RegisterStructValidation(fn StructLevelFunc, types ...interface{}) { |
| 255 | v.RegisterStructValidationCtx(wrapStructLevelFunc(fn), types...) |
| 256 | } |
| 257 | |
| 258 | // RegisterStructValidationCtx registers a StructLevelFuncCtx against a number of types and allows passing |
| 259 | // of contextual validation information via context.Context. |