Class: MCollective::Validator::RegexValidator
- Inherits:
-
Object
- Object
- MCollective::Validator::RegexValidator
- Defined in:
- lib/mcollective/validator/regex_validator.rb
Class Method Summary collapse
Class Method Details
.validate(validator, regex) ⇒ Object
4 5 6 |
# File 'lib/mcollective/validator/regex_validator.rb', line 4 def self.validate(validator, regex) raise ValidatorError, "value should match #{regex}" unless validator.match(regex) end |