Module: Grape::Validations

Defined in:
lib/grape/validations.rb,
lib/grape/validations/params_scope.rb,
lib/grape/validations/validators/base.rb,
lib/grape/validations/validators/regexp.rb,
lib/grape/validations/validators/values.rb,
lib/grape/validations/validators/coerce.rb,
lib/grape/validations/validators/default.rb,
lib/grape/validations/attributes_iterator.rb,
lib/grape/validations/validators/presence.rb,
lib/grape/validations/validators/allow_blank.rb,
lib/grape/validations/validators/all_or_none.rb,
lib/grape/validations/validators/exactly_one_of.rb,
lib/grape/validations/validators/at_least_one_of.rb,
lib/grape/validations/validators/mutual_exclusion.rb,
lib/grape/validations/validators/multiple_params_base.rb

Defined Under Namespace

Classes: AllOrNoneOfValidator, AllowBlankValidator, AtLeastOneOfValidator, AttributesIterator, Base, CoerceValidator, DefaultValidator, ExactlyOneOfValidator, MultipleParamsBase, MutualExclusionValidator, ParamsScope, PresenceValidator, RegexpValidator, ValuesValidator

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.validatorsObject

Returns the value of attribute validators



4
5
6
# File 'lib/grape/validations.rb', line 4

def validators
  @validators
end

Class Method Details

.register_validator(short_name, klass) ⇒ Object



9
10
11
# File 'lib/grape/validations.rb', line 9

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