Class: ValidateParams::Types::String
- Inherits:
-
Object
- Object
- ValidateParams::Types::String
- Defined in:
- lib/validate_params/types/string.rb
Class Method Summary collapse
Class Method Details
.cast(raw_value, scrub_invalid_utf8: false) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/validate_params/types/string.rb', line 8 def self.cast(raw_value, scrub_invalid_utf8: false, **) value = raw_value.to_s if scrub_invalid_utf8 value = Validatable::Utilities::Scrubber.scrub(raw_value) end value end |