diff --git a/rules.go b/rules.go index b67ac04..45fefb5 100644 --- a/rules.go +++ b/rules.go @@ -1732,6 +1732,10 @@ func compareFieldsBase(ctx *ValidatorCtx) (SizeCompareStatus, ConvertStatus) { } other := ctx.Field(ctx.Args[0]) + if other == nil { + return 0, Invalid + } + other.UnwrapPointer() if !other.HasValue() {