Fix all Rails/Validation rubocop issues and remove files from rubocop_todo list
This commit is contained in:
@@ -7,10 +7,10 @@ class Verification::Residence
|
||||
|
||||
before_validation :call_census_api
|
||||
|
||||
validates_presence_of :document_number
|
||||
validates_presence_of :document_type
|
||||
validates_presence_of :date_of_birth
|
||||
validates_presence_of :postal_code
|
||||
validates :document_number, presence: true
|
||||
validates :document_type, presence: true
|
||||
validates :date_of_birth, presence: true
|
||||
validates :postal_code, presence: true
|
||||
validates :terms_of_service, acceptance: { allow_nil: false }
|
||||
validates :postal_code, length: { is: 5 }
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ class Verification::Sms
|
||||
|
||||
attr_accessor :user, :phone, :confirmation_code
|
||||
|
||||
validates_presence_of :phone
|
||||
validates :phone, presence: true
|
||||
validates :phone, format: { with: /\A[\d \+]+\z/ }
|
||||
validate :uniqness_phone
|
||||
|
||||
|
||||
Reference in New Issue
Block a user