Module: Grape::Validations

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

Defined Under Namespace

Classes: AtLeastOneOfValidator, CoerceValidator, DefaultValidator, ExactlyOneOfValidator, MutualExclusionValidator, ParamsScope, PresenceValidator, RegexpValidator, SingleOptionValidator, Validator, ValuesValidator

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.validatorsObject

Returns the value of attribute validators.



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

def validators
  @validators
end

Class Method Details

.register_validator(short_name, klass) ⇒ Object



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

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