From 00a1d70bc579327db857e17c1cc173e8d51835e4 Mon Sep 17 00:00:00 2001 From: Stas Date: Tue, 3 May 2016 15:52:43 +0300 Subject: [PATCH] 111601356-ident_type_validation --- app/models/contact.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/contact.rb b/app/models/contact.rb index 57174296a..d6d5369dd 100644 --- a/app/models/contact.rb +++ b/app/models/contact.rb @@ -33,6 +33,7 @@ class Contact < ActiveRecord::Base uniqueness: { message: :epp_id_taken }, format: { with: /\A[\w\-\:\.\_]*\z/i, message: :invalid }, length: { maximum: 100, message: :too_long_contact_code } + validates :ident_type, inclusion: {in: %w( org priv birthday)} validate :val_ident_valid_format? validate :uniq_statuses? validate :validate_html