From 13a6466ef9874c9af4139024d1a142032859fd1f Mon Sep 17 00:00:00 2001 From: Anton Katunin Date: Sat, 29 Jun 2024 14:12:26 +1000 Subject: [PATCH] Add support for UUID v7 --- lib/active_interaction/extras/filters/uuid_filter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/active_interaction/extras/filters/uuid_filter.rb b/lib/active_interaction/extras/filters/uuid_filter.rb index e531b1c..2c43df1 100644 --- a/lib/active_interaction/extras/filters/uuid_filter.rb +++ b/lib/active_interaction/extras/filters/uuid_filter.rb @@ -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)