Class: Rosebud::Validations::RegexValidator
- Inherits:
-
Rosebud::Validator
- Object
- Rosebud::Validator
- Rosebud::Validations::RegexValidator
- Defined in:
- lib/rosebud/validations/regex_validator.rb
Instance Method Summary collapse
Methods inherited from Rosebud::Validator
Instance Method Details
#validate_param(name, value, pattern) ⇒ Object
4 5 6 |
# File 'lib/rosebud/validations/regex_validator.rb', line 4 def validate_param(name, value, pattern) error!(:regex, param: name) if value && (value.to_s =~ pattern).nil? end |