mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 02:35:57 +02:00
fix contacts name validation
This commit is contained in:
parent
ded22685c9
commit
2a81b66d61
1 changed files with 1 additions and 0 deletions
|
@ -29,6 +29,7 @@ class Contact < ApplicationRecord
|
||||||
}
|
}
|
||||||
|
|
||||||
validates :name, :email, presence: true
|
validates :name, :email, presence: true
|
||||||
|
validates :name, format: { with: /\A[a-zA-Z\s]+\Z/, message: :invalid }
|
||||||
validates :street, :city, :zip, :country_code, presence: true, if: lambda {
|
validates :street, :city, :zip, :country_code, presence: true, if: lambda {
|
||||||
self.class.address_processing?
|
self.class.address_processing?
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue