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