Module: StructuredParams::Validations::ClassMethods
- Defined in:
- sig/structured_params/validations.rbs
Instance Method Summary collapse
-
#validates_raw ⇒ void
Validates raw attribute value before type casting.
-
#validates_raw_install_remap_validator_once ⇒ void
: () -> void.
Instance Method Details
#validates_raw ⇒ void
This method returns an undefined value.
Validates raw attribute value before type casting.
Accepts the same options as validates (format, numericality, presence, etc.),
but validates the raw input value before it is converted by ActiveModel::Attributes.
Examples:
validates_raw :age, format: { with: /\A\d+\z/ }
validates_raw :score, numericality: { only_integer: true }
validates_raw :code, format: { with: /\A[A-Z]+\z/, message: 'must be uppercase' }
: (*Symbol, **untyped) -> void
36 |
# File 'sig/structured_params/validations.rbs', line 36
def validates_raw: (*Symbol, **untyped) -> void
|
#validates_raw_install_remap_validator_once ⇒ void
This method returns an undefined value.
: () -> void
39 |
# File 'sig/structured_params/validations.rbs', line 39
def validates_raw_install_remap_validator_once: () -> void
|