Skip to content

Commit 77f59a0

Browse files
joeybloggsjoeybloggs
authored andcommitted
corrected some spelling mistakes in documentation
1 parent 1d3a3d2 commit 77f59a0

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

baked_in.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -300,39 +300,39 @@ func IsISBN10(v *Validate, topStruct reflect.Value, currentStructOrField reflect
300300
return checksum%11 == 0
301301
}
302302

303-
// ExcludesRune is the validation function for validating that the field's value does not contain the rune specified withing the param.
303+
// ExcludesRune is the validation function for validating that the field's value does not contain the rune specified within the param.
304304
// NOTE: This is exposed for use within your own custom functions and not intended to be called directly.
305305
func ExcludesRune(v *Validate, topStruct reflect.Value, currentStructOrField reflect.Value, field reflect.Value, fieldType reflect.Type, fieldKind reflect.Kind, param string) bool {
306306
return !ContainsRune(v, topStruct, currentStructOrField, field, fieldType, fieldKind, param)
307307
}
308308

309-
// ExcludesAll is the validation function for validating that the field's value does not contain any of the characters specified withing the param.
309+
// ExcludesAll is the validation function for validating that the field's value does not contain any of the characters specified within the param.
310310
// NOTE: This is exposed for use within your own custom functions and not intended to be called directly.
311311
func ExcludesAll(v *Validate, topStruct reflect.Value, currentStructOrField reflect.Value, field reflect.Value, fieldType reflect.Type, fieldKind reflect.Kind, param string) bool {
312312
return !ContainsAny(v, topStruct, currentStructOrField, field, fieldType, fieldKind, param)
313313
}
314314

315-
// Excludes is the validation function for validating that the field's value does not contain the text specified withing the param.
315+
// Excludes is the validation function for validating that the field's value does not contain the text specified within the param.
316316
// NOTE: This is exposed for use within your own custom functions and not intended to be called directly.
317317
func Excludes(v *Validate, topStruct reflect.Value, currentStructOrField reflect.Value, field reflect.Value, fieldType reflect.Type, fieldKind reflect.Kind, param string) bool {
318318
return !Contains(v, topStruct, currentStructOrField, field, fieldType, fieldKind, param)
319319
}
320320

321-
// ContainsRune is the validation function for validating that the field's value contains the rune specified withing the param.
321+
// ContainsRune is the validation function for validating that the field's value contains the rune specified within the param.
322322
// NOTE: This is exposed for use within your own custom functions and not intended to be called directly.
323323
func ContainsRune(v *Validate, topStruct reflect.Value, currentStructOrField reflect.Value, field reflect.Value, fieldType reflect.Type, fieldKind reflect.Kind, param string) bool {
324324
r, _ := utf8.DecodeRuneInString(param)
325325

326326
return strings.ContainsRune(field.String(), r)
327327
}
328328

329-
// ContainsAny is the validation function for validating that the field's value contains any of the characters specified withing the param.
329+
// ContainsAny is the validation function for validating that the field's value contains any of the characters specified within the param.
330330
// NOTE: This is exposed for use within your own custom functions and not intended to be called directly.
331331
func ContainsAny(v *Validate, topStruct reflect.Value, currentStructOrField reflect.Value, field reflect.Value, fieldType reflect.Type, fieldKind reflect.Kind, param string) bool {
332332
return strings.ContainsAny(field.String(), param)
333333
}
334334

335-
// Contains is the validation function for validating that the field's value contains the text specified withing the param.
335+
// Contains is the validation function for validating that the field's value contains the text specified within the param.
336336
// NOTE: This is exposed for use within your own custom functions and not intended to be called directly.
337337
func Contains(v *Validate, topStruct reflect.Value, currentStructOrField reflect.Value, field reflect.Value, fieldType reflect.Type, fieldKind reflect.Kind, param string) bool {
338338
return strings.Contains(field.String(), param)

doc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ Here is a list of the current built in validators:
162162
163163
Skip Field
164164
165-
Tells the validation to skip this struct field; this is particularily
165+
Tells the validation to skip this struct field; this is particularly
166166
handy in ignoring embedded structs from being validated. (Usage: -)
167167
Usage: -
168168

util.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func (v *Validate) extractTypeInternal(current reflect.Value, nullable bool) (re
8282
// GetStructFieldOK traverses a struct to retrieve a specific field denoted by the provided namespace and
8383
// returns the field, field kind and whether is was successful in retrieving the field at all.
8484
// NOTE: when not successful ok will be false, this can happen when a nested struct is nil and so the field
85-
// could not be retrived because it didn't exist.
85+
// could not be retrieved because it didn't exist.
8686
func (v *Validate) GetStructFieldOK(current reflect.Value, namespace string) (reflect.Value, reflect.Kind, bool) {
8787

8888
current, kind := v.ExtractType(current)
@@ -215,7 +215,7 @@ func (v *Validate) GetStructFieldOK(current reflect.Value, namespace string) (re
215215
panic("Invalid field namespace")
216216
}
217217

218-
// asInt retuns the parameter as a int64
218+
// asInt returns the parameter as a int64
219219
// or panics if it can't convert
220220
func asInt(param string) int64 {
221221

validator_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,7 @@ func TestStructPartial(t *testing.T) {
723723
errs = validate.StructPartial(tPartial, p2...)
724724
Equal(t, errs, nil)
725725

726-
// this isnt really a robust test, but is ment to illustrate the ANON CASE below
726+
// this isn't really a robust test, but is ment to illustrate the ANON CASE below
727727
errs = validate.StructPartial(tPartial.SubSlice[0], p3...)
728728
Equal(t, errs, nil)
729729

0 commit comments

Comments
 (0)