2016-08-24 12:49:21 +05:30
|
|
|
module Gitlab
|
|
|
|
module Ci
|
|
|
|
class Config
|
2017-08-17 22:00:37 +05:30
|
|
|
module Entry
|
2016-08-24 12:49:21 +05:30
|
|
|
class Validator < SimpleDelegator
|
|
|
|
include ActiveModel::Validations
|
2017-08-17 22:00:37 +05:30
|
|
|
include Entry::Validators
|
2016-08-24 12:49:21 +05:30
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
def initialize(entry)
|
|
|
|
super(entry)
|
2016-08-24 12:49:21 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
def messages
|
|
|
|
errors.full_messages.map do |error|
|
|
|
|
"#{location} #{error}".downcase
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.name
|
|
|
|
'Validator'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|