mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-17 16:46:06 +10:00
27 lines
496 B
Ruby
27 lines
496 B
Ruby
module Gitlab
|
|
module Ci
|
|
class Config
|
|
module Node
|
|
class Validator < SimpleDelegator
|
|
include ActiveModel::Validations
|
|
|
|
def initialize(node)
|
|
super(node)
|
|
@node = node
|
|
end
|
|
|
|
def full_errors
|
|
errors.full_messages.map do |error|
|
|
"#{@node.key} #{error}".humanize
|
|
end
|
|
end
|
|
|
|
def self.name
|
|
'Validator'
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|