Revert "Add reject pattern to Admin setting"

This reverts commit 0cd5faaa9d.
This commit is contained in:
2024-02-22 20:46:08 +09:00
parent c2e185162d
commit 0eb421cc64
9 changed files with 2 additions and 275 deletions

View File

@@ -1,13 +0,0 @@
# frozen_string_literal: true
class RegexpSyntaxValidator < ActiveModel::EachValidator
def validate_each(record, attribute, value)
return if value.blank?
begin
Regexp.compile(value)
rescue RegexpError => e
record.errors.add(attribute, I18n.t('applications.invalid_regexp', message: e.message))
end
end
end