Module: EasyType::Validators::Name
- Defined in:
- lib/easy_type/validators.rb
Overview
Instance Method Summary (collapse)
Instance Method Details
- (Object) unsafe_validate(value)
22 23 24 25 |
# File 'lib/easy_type/validators.rb', line 22 def unsafe_validate(value) raise Puppet::Error, "Name must not contain whitespace: #{value}" if value =~ /\s/ raise Puppet::Error, "Name must not be empty" if value.empty? end |