Skip to content

Commit

Permalink
Merge pull request #108 from olleolleolle/opt-match
Browse files Browse the repository at this point in the history
perf: Prefer #match? over #match
  • Loading branch information
ledermann authored Jun 8, 2022
2 parents ba7c122 + 8692ebc commit 8f583ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sepa_king/validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def validate(record)
value = record.send(field_name)

if value
unless value.to_s.match(REGEX)
unless value.to_s.match?(REGEX)
record.errors.add(field_name, :invalid, message: options[:message])
end
end
Expand Down

0 comments on commit 8f583ab

Please sign in to comment.