Skip to content

Commit

Permalink
[Fix] Regular expression error message
Browse files Browse the repository at this point in the history
  • Loading branch information
JanGalek committed Jan 31, 2025
1 parent b03156b commit fcc59ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion constraints/regexp.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (c RegularExpression) Validate(value any) error {
}

if matched, _ := regexp.MatchString(c.Regexp, str); !matched {
return errors.New("this value is not a valid email address")
return errors.New("this value is not match to regular expression")
}

return nil
Expand Down

0 comments on commit fcc59ed

Please sign in to comment.