File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -61,11 +61,11 @@ func New(opts ...Option) *Validator {
61
61
// It creates a new instance of type T, allocates values for all fields recursively,
62
62
// creates a Configurator instance for the type T, calls the provided function fn with the Configurator
63
63
// instance and the instance of type T, and appends any user-defined validators to the Configurator instance.
64
- func Configure [T any ](v * Validator , fn func (builder Configurator [T ], obj * T )) {
65
- obj := new (T )
64
+ func Configure [T any ](v * Validator , fn func (builder Configurator [T ], m * T )) {
65
+ model := new (T )
66
66
// allocate all pointer fields values recursively
67
- mustZero (obj )
68
- b := configure [T ](v , obj , nil )
67
+ mustZero (model )
68
+ b := configure [T ](v , model , nil )
69
69
// Append users validators
70
- fn (b , obj )
70
+ fn (b , model )
71
71
}
You can’t perform that action at this time.
0 commit comments