check tag input

This commit is contained in:
Kyle Drake 2024-02-17 10:55:51 -06:00
parent 6444fe7e94
commit 9800a4ad4b
3 changed files with 3 additions and 2 deletions

View file

@ -1093,7 +1093,7 @@ class Site < Sequel::Model
new_tags.each do |tag|
tag.strip!
if tag.match(/[^a-zA-Z0-9 ]/)
if tag.match(Tag::INVALID_TAG_REGEX)
errors.add :new_tags_string, "Tag \"#{tag}\" can only contain letters (A-Z) and numbers (0-9)."
break
end