mirror of
https://github.com/internetee/registry.git
synced 2025-07-21 18:26:06 +02:00
Move statuses to domain #2623
This commit is contained in:
parent
0d0fd3407d
commit
50346c80c8
8 changed files with 78 additions and 45 deletions
|
@ -2,7 +2,7 @@ class AdminUser < User
|
|||
validates :username, :country_code, :roles, presence: true
|
||||
validates :identity_code, uniqueness: true, allow_blank: true
|
||||
validates :identity_code, presence: true, if: -> { country_code == 'EE' }
|
||||
validates :email, presence: true
|
||||
validates :email, presence: true
|
||||
validates :password, :password_confirmation, presence: true, if: :new_record?
|
||||
validates :password_confirmation, presence: true, if: :encrypted_password_changed?
|
||||
validate :validate_identity_code, if: -> { country_code == 'EE' }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue