class MCollective::Validator::LengthValidator
Public Class Methods
validate(validator, length)
click to toggle source
# File lib/mcollective/validator/length_validator.rb 4 def self.validate(validator, length) 5 if (validator.size > length) && (length > 0) 6 raise ValidatorError, "Input string is longer than #{length} character(s)" 7 end 8 end