validate color

This commit is contained in:
Pete Matsyburka
2026-04-26 15:13:19 +03:00
parent b93c7cd261
commit 81a6a48d70
3 changed files with 11 additions and 9 deletions
+2
View File
@@ -1,6 +1,8 @@
# frozen_string_literal: true
module Templates
COLOR_REGEXP = /\A(#(?:[0-9a-f]{3}|[0-9a-f]{6})|[a-z]+)\z/i
EXPIRATION_DURATIONS = {
one_day: 1.day,
two_days: 2.days,