1
0
mirror of https://github.com/flarum/core.git synced 2025-08-06 16:36:47 +02:00

chore: use hex_color rule for color validation (#3936)

This commit is contained in:
Ngô Quốc Đạt
2024-01-19 18:09:22 +07:00
committed by GitHub
parent 0186ca909e
commit 734f4a150c
2 changed files with 2 additions and 1 deletions

View File

@@ -18,6 +18,6 @@ class TagValidator extends AbstractValidator
'slug' => ['required', 'unique:tags', 'regex:/^[^\/\\ ]*$/i'],
'is_hidden' => ['bool'],
'description' => ['string', 'max:700'],
'color' => ['regex:/^#([a-f0-9]{6}|[a-f0-9]{3})$/i'],
'color' => ['hex_color'],
];
}