Remove ProcedurePath

This commit is contained in:
Paul Chavard 2018-10-25 17:40:23 +02:00
parent 46e5e0a4fd
commit 78dc582588
13 changed files with 13 additions and 144 deletions

View file

@ -1,15 +0,0 @@
class ProcedurePathFormatValidator < ActiveModel::Validator
def path_regex
/^[a-z0-9_]{3,30}$/
end
def validate(record)
if record.path.blank?
return false
end
if !path_regex.match(record.path)
record.errors[:path] << "Path invalide"
end
end
end