Skip to content

Commit

Permalink
ISSUE-213 - Fetch default language if no language is given when valid…
Browse files Browse the repository at this point in the history
…ating
  • Loading branch information
BowlOfSoup committed Jun 26, 2024
1 parent f378d2e commit fde6d59
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions validation/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,9 @@ func Validate(options *Options) (*Errors, []error) {
if options.Extra == nil {
options.Extra = map[any]any{}
}
if options.Language == nil {
options.Language = lang.New().GetDefault()
}

rules := options.Rules.AsRules()
for _, field := range rules {
Expand Down

0 comments on commit fde6d59

Please sign in to comment.