GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Test Setup Failed
Push — master ( cba67b...24adef )
by Leonardo
52s
created

IbanValidator.country_valid?   A

Complexity

Conditions 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
dl 0
loc 4
rs 10
1
# frozen_string_literal: true
2
3
require "iban_bic"
4
5
module IbanBic
6
  class IbanValidator < ActiveModel::EachValidator
7
    def validate_each(record, attribute, value)
8
      if !IbanBic.parse(value)
9
        record.errors.add(attribute, :invalid_format)
10
      elsif !IbanBic.valid_check?(value)
11
        record.errors.add(attribute, :invalid_check)
12
      elsif !IbanBic.valid_country_check?(value)
13
        record.errors.add(attribute, :invalid_country_check)
14
      end
15
    end
16
  end
17
end
18