mirror of
https://github.com/internetee/registry.git
synced 2025-08-02 07:52:04 +02:00
parent
9a6f5939c4
commit
bacf5f8d64
6 changed files with 152 additions and 12 deletions
|
@ -22,8 +22,8 @@ class Contact < ActiveRecord::Base
|
|||
validates :name, :phone, :email, :ident, :ident_type, :registrar, presence: true
|
||||
validates :street, :city, :zip, :country_code, presence: true, if: 'self.class.address_processing?'
|
||||
|
||||
# Phone nr validation is very minimam in order to support legacy requirements
|
||||
validates :phone, format: /\+[0-9]{1,3}\.[0-9]{1,14}?/
|
||||
validates :phone, format: /\+[0-9]{1,3}\.[0-9]{1,14}?/, phone: true
|
||||
|
||||
validates :email, format: /@/
|
||||
validates :email, email_format: { message: :invalid }, if: proc { |c| c.email_changed? }
|
||||
validates :ident,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue