Method: FileuidValidator#match_regexp?

Defined in:
app/validators/fileuid_validator.rb

#match_regexp?(record, attribute, value) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
14
15
16
17
18
# File 'app/validators/fileuid_validator.rb', line 11

def match_regexp?(record, attribute, value)
  type = nil
  if type
    value =~ EgovUtils::Fileuid::TYPES[type].to_regex
  else
    EgovUtils::Fileuid::TYPES.values.any?{|type_def| value =~ type_def.to_regex }
  end
end