Sha256: a7ea21aa6f3604706c9c21b2a7362419d8d5322bdd80b9fc458f54a4bf78d815

Contents?: true

Size: 285 Bytes

Versions: 2

Compression:

Stored size: 285 Bytes

Contents

module Yoti
  # Process age attribute
  class AgeProcessor
    AGE_PATTERN = 'age_(over|under):[1-9][0-9]?[0-9]?'

    # check if the key matches the format age_[over|under]:[1-999]
    def self.is_age_verification(age_field)
      /#{AGE_PATTERN}/.match?(age_field)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
yoti-1.5.0 lib/yoti/util/age_processor.rb
yoti-1.4.0 lib/yoti/util/age_processor.rb