Revert "Add reject pattern to Admin setting"
This reverts commit 0cd5faaa9d
.
This commit is contained in:
@@ -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
|
Reference in New Issue
Block a user