Added ident country code error #2590

This commit is contained in:
Priit Tark 2015-06-01 17:48:23 +03:00
parent f5feba0509
commit 4448284680
5 changed files with 24 additions and 5 deletions

View file

@ -181,7 +181,7 @@ class Contact < ActiveRecord::Base
if code
self.ident_country_code = code.alpha2
else
errors.add(:ident_country_code, 'is not following ISO_3166-1 alpha 2 format')
errors.add(:ident, :invalid_country_code)
end
end
end