Enable the Layout/EmptyLinesAroundClassBody cop
This commit is contained in:
parent
f1907f4d0e
commit
24e7537c49
52 changed files with 1 additions and 69 deletions
|
@ -1,5 +1,4 @@
|
|||
class EmailFormatValidator < ActiveModel::Validator
|
||||
|
||||
def email_regex
|
||||
/\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i
|
||||
end
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
class ProcedurePathFormatValidator < ActiveModel::Validator
|
||||
|
||||
def path_regex
|
||||
/^[a-z0-9_]{3,30}$/
|
||||
end
|
||||
|
@ -8,5 +7,4 @@ class ProcedurePathFormatValidator < ActiveModel::Validator
|
|||
return false if record.path.blank?
|
||||
record.errors[:path] << "Path invalide" unless path_regex.match(record.path)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue