Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aacebo committed Apr 6, 2024
1 parent cd6bb9e commit d5c7cdc
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion rules/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func Format(ctx Context) []error {
value := ctx.CoerceValue()
param := ctx.Param()

if value.Kind() == reflect.Invalid {
if !value.IsValid() || value.IsZero() {
return errs
}

Expand Down
2 changes: 1 addition & 1 deletion rules/max.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func Max(ctx Context) []error {
errs := []error{}
value := ctx.CoerceValue()

if value.Kind() == reflect.Invalid {
if !value.IsValid() || value.IsZero() {
return errs
}

Expand Down
2 changes: 1 addition & 1 deletion rules/min.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func Min(ctx Context) []error {
errs := []error{}
value := ctx.CoerceValue()

if value.Kind() == reflect.Invalid {
if !value.IsValid() || value.IsZero() {
return errs
}

Expand Down
2 changes: 1 addition & 1 deletion rules/pattern.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func Pattern(ctx Context) []error {
value := ctx.CoerceValue()
param := ctx.Param()

if value.Kind() == reflect.Invalid {
if !value.IsValid() || value.IsZero() {
return errs
}

Expand Down

0 comments on commit d5c7cdc

Please sign in to comment.