File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -156,7 +156,7 @@ func main() {
156
156
}
157
157
158
158
// UserStructLevelValidation contains custom struct level validations that don't always
159
- // make sense at the field validation level. For Example this function validates that either
159
+ // make sense at the field validation level. For example, this function validates that either
160
160
// FirstName or LastName exist; could have done that with a custom field validation but then
161
161
// would have had to add it to both fields duplicating the logic + overhead, this way it's
162
162
// only validated once.
Original file line number Diff line number Diff line change @@ -188,7 +188,7 @@ Same as structonly tag except that any struct level validations will not run.
188
188
189
189
# Omit Empty
190
190
191
- Allows conditional validation, for example if a field is not set with
191
+ Allows conditional validation, for example, if a field is not set with
192
192
a value (Determined by the "required" validator) then other validation
193
193
such as min or max won't run, but if a value is set validation will run.
194
194
Original file line number Diff line number Diff line change @@ -105,24 +105,24 @@ type FieldError interface {
105
105
// StructNamespace returns the namespace for the field error, with the field's
106
106
// actual name.
107
107
//
108
- // eq . "User.FirstName" see Namespace for comparison
108
+ // eg . "User.FirstName" see Namespace for comparison
109
109
//
110
110
// NOTE: this field can be blank when validating a single primitive field
111
111
// using validate.Field(...) as there is no way to extract its name
112
112
StructNamespace () string
113
113
114
- // Field returns the fields name with the tag name taking precedence over the
114
+ // Field returns the field's name with the tag name taking precedence over the
115
115
// field's actual name.
116
116
//
117
117
// `RegisterTagNameFunc` must be registered to get tag value.
118
118
//
119
- // eq . JSON name "fname"
119
+ // eg . JSON name "fname"
120
120
// see StructField for comparison
121
121
Field () string
122
122
123
123
// StructField returns the field's actual name from the struct, when able to determine.
124
124
//
125
- // eq . "FirstName"
125
+ // eg . "FirstName"
126
126
// see Field for comparison
127
127
StructField () string
128
128
Original file line number Diff line number Diff line change @@ -217,7 +217,7 @@ BEGIN:
217
217
panic ("Invalid field namespace" )
218
218
}
219
219
220
- // asInt returns the parameter as a int64
220
+ // asInt returns the parameter as an int64
221
221
// or panics if it can't convert
222
222
func asInt (param string ) int64 {
223
223
i , err := strconv .ParseInt (param , 0 , 64 )
You can’t perform that action at this time.
0 commit comments