summaryrefslogtreecommitdiff
path: root/vendor/github.com/go-playground/validator/v10/validator.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2022-05-02 14:05:18 +0100
committerLibravatar GitHub <noreply@github.com>2022-05-02 15:05:18 +0200
commitb56dae8120d43b9acd3d3ed4d40100ffab7b972a (patch)
treed55d30589d8a8499ed3d5eecba163abc9fa78c27 /vendor/github.com/go-playground/validator/v10/validator.go
parentadd extra indexes as a migration (#527) (diff)
downloadgotosocial-b56dae8120d43b9acd3d3ed4d40100ffab7b972a.tar.xz
[chore] Update all but bun libraries (#526)
* update all but bun libraries Signed-off-by: kim <grufwub@gmail.com> * remove my personal build script changes Signed-off-by: kim <grufwub@gmail.com>
Diffstat (limited to 'vendor/github.com/go-playground/validator/v10/validator.go')
-rw-r--r--vendor/github.com/go-playground/validator/v10/validator.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/vendor/github.com/go-playground/validator/v10/validator.go b/vendor/github.com/go-playground/validator/v10/validator.go
index 2a4fad022..80da095a6 100644
--- a/vendor/github.com/go-playground/validator/v10/validator.go
+++ b/vendor/github.com/go-playground/validator/v10/validator.go
@@ -164,7 +164,7 @@ func (v *validate) traverseField(ctx context.Context, parent reflect.Value, curr
typ = current.Type()
- if typ != timeType {
+ if !typ.ConvertibleTo(timeType) {
if ct != nil {
@@ -355,6 +355,10 @@ OUTER:
v.ct = ct
if ct.fn(ctx, v) {
+ if ct.isBlockEnd {
+ ct = ct.next
+ continue OUTER
+ }
// drain rest of the 'or' values, then continue or leave
for {
@@ -368,6 +372,11 @@ OUTER:
if ct.typeof != typeOr {
continue OUTER
}
+
+ if ct.isBlockEnd {
+ ct = ct.next
+ continue OUTER
+ }
}
}