mirror of
https://github.com/internetee/registry.git
synced 2025-07-29 22:16:19 +02:00
fixed codeclimate errors
This commit is contained in:
parent
f4e0084895
commit
e7e3278267
44 changed files with 118 additions and 150 deletions
|
@ -6,9 +6,7 @@ class PhoneValidator < ActiveModel::EachValidator
|
|||
country_code = phone_parts.first
|
||||
subscriber_no = phone_parts.second
|
||||
|
||||
if zeros_only?(country_code) || zeros_only?(subscriber_no)
|
||||
record.errors.add(attribute, :invalid)
|
||||
end
|
||||
record.errors.add(attribute, :invalid) if zeros_only?(country_code) || zeros_only?(subscriber_no)
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue