mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
parent
7d2d34cb34
commit
bc3962cdfa
4 changed files with 63 additions and 16 deletions
|
@ -22,7 +22,7 @@ class Contact < ActiveRecord::Base
|
|||
validates :name, :email, :ident, :ident_type, presence: true
|
||||
validates :street, :city, :zip, :country_code, presence: true, if: 'self.class.address_processing?'
|
||||
|
||||
validates :phone, presence: true, format: /\+[0-9]{1,3}\.[0-9]{1,14}?/, phone: true
|
||||
validates :phone, presence: true, e164: true, phone: true
|
||||
|
||||
validates :email, format: /@/
|
||||
validates :email, email_format: { message: :invalid }, if: proc { |c| c.email_changed? }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue