def get_patterns(all_patterns, type)
      type = Core::FIXED_LINE if type == Core::FIXED_OR_MOBILE
      patterns = all_patterns[type]

      if patterns
        [
          type_regex(patterns, Core::POSSIBLE_PATTERN),
          type_regex(patterns, Core::VALID_PATTERN)
        ]
      else
        [nil, nil]
      end
    end
def get_patterns(all_patterns, type)
      type = Core::FIXED_LINE if type == Core::FIXED_OR_MOBILE
      patterns = all_patterns[type]

      if patterns
        [
          type_regex(patterns, Core::POSSIBLE_PATTERN),
          type_regex(patterns, Core::VALID_PATTERN)
        ]
      else
        [nil, nil]
      end
    end
Returns possible and valid patterns for validation for provided type

 ==== Attributes

 * +all_patterns+ - hash of all patterns for validation
 * +type+ - type of phone to get patterns for