From 25531c609f34df20f80086040e4bed78adfa0d56 Mon Sep 17 00:00:00 2001 From: Simon Coffey Date: Mon, 19 Jun 2023 12:09:32 +0100 Subject: [PATCH] Fix broken validation messages A typo in https://github.com/hallelujah/valid_email/pull/122 appears to have introduced an error here that's causing a large number of test failures. Closes #124, closes #123, fixes #120 --- lib/valid_email/email_validator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/valid_email/email_validator.rb b/lib/valid_email/email_validator.rb index 72302ca..0fe7998 100644 --- a/lib/valid_email/email_validator.rb +++ b/lib/valid_email/email_validator.rb @@ -22,7 +22,7 @@ def validate_each(record,attribute,value) end unless r msg = (options[:message] || I18n.t(:invalid, :scope => "valid_email.validations.email")) - record.errors.add attribute, message: I18n.interpolate(msgs, value: value) + record.errors.add attribute, message: I18n.interpolate(msg, value: value) end end end