mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 17:28:18 +02:00
Revert "Registry 569"
This commit is contained in:
parent
9565f23e68
commit
4786dbb943
50 changed files with 323 additions and 2463 deletions
|
@ -1,11 +0,0 @@
|
|||
class Iso31661Alpha2Validator < ActiveModel::EachValidator
|
||||
def validate_each(record, attribute, value)
|
||||
record.errors.add(attribute, :invalid_iso31661_alpha2) unless valid_country_code?(value)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def valid_country_code?(country_code)
|
||||
Country.new(country_code)
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue