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() {
156156}
157157
158158// 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
160160// FirstName or LastName exist; could have done that with a custom field validation but then
161161// would have had to add it to both fields duplicating the logic + overhead, this way it's
162162// 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.
188188
189189# Omit Empty
190190
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
192192a value (Determined by the "required" validator) then other validation
193193such as min or max won't run, but if a value is set validation will run.
194194
Original file line number Diff line number Diff line change @@ -105,24 +105,24 @@ type FieldError interface {
105105 // StructNamespace returns the namespace for the field error, with the field's
106106 // actual name.
107107 //
108- // eq . "User.FirstName" see Namespace for comparison
108+ // eg . "User.FirstName" see Namespace for comparison
109109 //
110110 // NOTE: this field can be blank when validating a single primitive field
111111 // using validate.Field(...) as there is no way to extract its name
112112 StructNamespace () string
113113
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
115115 // field's actual name.
116116 //
117117 // `RegisterTagNameFunc` must be registered to get tag value.
118118 //
119- // eq . JSON name "fname"
119+ // eg . JSON name "fname"
120120 // see StructField for comparison
121121 Field () string
122122
123123 // StructField returns the field's actual name from the struct, when able to determine.
124124 //
125- // eq . "FirstName"
125+ // eg . "FirstName"
126126 // see Field for comparison
127127 StructField () string
128128
Original file line number Diff line number Diff line change @@ -217,7 +217,7 @@ BEGIN:
217217 panic ("Invalid field namespace" )
218218}
219219
220- // asInt returns the parameter as a int64
220+ // asInt returns the parameter as an int64
221221// or panics if it can't convert
222222func asInt (param string ) int64 {
223223 i , err := strconv .ParseInt (param , 0 , 64 )
You can’t perform that action at this time.
0 commit comments