mirror of
https://github.com/internetee/registry.git
synced 2025-07-03 01:33:36 +02:00
Story#109590460 - update country code validation
This commit is contained in:
parent
ffb8bc61dd
commit
b5b0dc7f21
1 changed files with 1 additions and 1 deletions
|
@ -219,7 +219,7 @@ class Contact < ActiveRecord::Base
|
|||
errors.add(:ident, :invalid_EE_identity_format) unless Isikukood.new(ident).valid?
|
||||
when 'org'.freeze
|
||||
# !%w(1 7 8 9).freeze.include?(ident.first) ||
|
||||
if ident.size != 8 || ident !=~/\A[0-9]{8}\z/
|
||||
if ident.size != 8 || !(ident =~/\A[0-9]{8}\z/)
|
||||
errors.add(:ident, :invalid_EE_identity_format)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue