Skip to content

Commit

Permalink
Fix on empty on ValidatValue
Browse files Browse the repository at this point in the history
  • Loading branch information
raoptimus committed Mar 13, 2024
1 parent b0deebf commit 44a6647
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ func ValidateValue(ctx context.Context, value any, rules ...Rule) error {
result := NewResult()

for _, r := range rules {
if isSkipValidate(ctx, value, r) {
continue
}
if err := r.ValidateValue(ctx, value); err != nil {
var errRes Result
if errors.As(err, &errRes) {
Expand Down

0 comments on commit 44a6647

Please sign in to comment.