Class: Serega::SeregaValidations::Initiate::CheckModifiers
- Inherits:
-
Object
- Object
- Serega::SeregaValidations::Initiate::CheckModifiers
- Defined in:
- lib/serega/validations/initiate/check_modifiers.rb
Overview
Modifiers validation
Instance Method Summary collapse
-
#call(serializer_class, only, with, except) ⇒ void
Validates provided fields names are existing attributes.
Instance Method Details
#call(serializer_class, only, with, except) ⇒ void
This method returns an undefined value.
Validates provided fields names are existing attributes
25 26 27 28 29 30 31 |
# File 'lib/serega/validations/initiate/check_modifiers.rb', line 25 def call(serializer_class, only, with, except) validate(serializer_class, only) if only validate(serializer_class, with) if with validate(serializer_class, except) if except raise_errors(serializer_class) if any_error? end |