Sha256: 1d836f6461a5f1d3252b56255c9852e0c01b756ba3a4914783f476954907b897
Contents?: true
Size: 254 Bytes
Versions: 14
Compression:
Stored size: 254 Bytes
Contents
module ChefAPI class Validator::Required < Validator::Base def validate(resource) value = resource._attributes[attribute] if value.to_s.strip.empty? resource.errors.add(attribute, 'must be present') end end end end
Version data entries
14 entries across 14 versions & 2 rubygems