Module: Grape::Validations

Defined in:
lib/grape/validations.rb,
lib/grape/validations/coerce.rb,
lib/grape/validations/regexp.rb,
lib/grape/validations/presence.rb

Defined Under Namespace

Modules: ClassMethods Classes: CoerceValidator, ParamsScope, PresenceValidator, RegexpValidator, SingleOptionValidator, Validator

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.validatorsObject

Returns the value of attribute validators.



65
66
67
# File 'lib/grape/validations.rb', line 65

def validators
  @validators
end

Class Method Details

.register_validator(short_name, klass) ⇒ Object



70
71
72
# File 'lib/grape/validations.rb', line 70

def self.register_validator(short_name, klass)
  validators[short_name] = klass
end