Module: Grape::Validations

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

Defined Under Namespace

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

Class Attribute Summary (collapse)

Class Method Summary (collapse)

Class Attribute Details

+ (Object) validators

Returns the value of attribute validators



77
78
79
# File 'lib/grape/validations.rb', line 77

def validators
  @validators
end

Class Method Details

+ (Object) register_validator(short_name, klass)



82
83
84
# File 'lib/grape/validations.rb', line 82

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