Class: MCollective::Validator::LengthValidator
- Inherits:
-
Object
- Object
- MCollective::Validator::LengthValidator
- Defined in:
- lib/mcollective/validator/length_validator.rb
Class Method Summary collapse
Class Method Details
.validate(validator, length) ⇒ Object
4 5 6 |
# File 'lib/mcollective/validator/length_validator.rb', line 4 def self.validate(validator, length) raise ValidatorError, "Input string is longer than #{length} character(s)" if (validator.size > length) && (length > 0) end |