mirror of
https://github.com/we-promise/sure.git
synced 2026-05-24 13:04:56 +00:00
* feat(exports): add rule operand references * fix(exports): preserve rule operand references * refactor(exports): simplify rule operand branches * refactor(validation): centralize UUID format checks * fix(imports): preserve false rule operands
12 lines
217 B
Ruby
12 lines
217 B
Ruby
# frozen_string_literal: true
|
|
|
|
module UuidFormat
|
|
PATTERN = /\A[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\z/i.freeze
|
|
|
|
module_function
|
|
|
|
def valid?(value)
|
|
PATTERN.match?(value.to_s)
|
|
end
|
|
end
|