Skip to content

Commit

Permalink
Add support for UUID v7
Browse files Browse the repository at this point in the history
  • Loading branch information
antulik committed Jun 29, 2024
1 parent cb60444 commit 13a6466
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/active_interaction/extras/filters/uuid_filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class ActiveInteraction::Extras::Filters::UUIDFilter < ActiveInteraction::StringFilter
register :uuid

REGEX = /^[0-9A-F]{8}-[0-9A-F]{4}-[4][0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i.freeze
REGEX = /^[0-9A-F]{8}-[0-9A-F]{4}-[47][0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i.freeze

def matches?(value)
super && REGEX.match?(value)
Expand Down

0 comments on commit 13a6466

Please sign in to comment.