Skip to content
This repository was archived by the owner on May 29, 2020. It is now read-only.

Commit ee21834

Browse files
committed
UrlFormatValidator のエラーメッセージを改善
1 parent 8afdc0a commit ee21834

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/validators/url_format_validator.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ def self.valid?(value)
33
URI.parse(value).kind_of?(URI::HTTP) rescue false
44
end
55
def validate_each(object, attribute, value)
6-
object.errors[attribute] << (options[:message] || "の形式が不正です") unless UrlFormatValidator.valid?(value)
6+
object.errors[attribute] << (options[:message] || I18n.t("errors.messages.invalid")) unless UrlFormatValidator.valid?(value)
77
end
88
end

0 commit comments

Comments
 (0)