Remove ProcedurePath
This commit is contained in:
parent
46e5e0a4fd
commit
78dc582588
13 changed files with 13 additions and 144 deletions
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue