Class: ESS::Validation::TextIsNotNull

Inherits:
Object
  • Object
show all
Defined in:
lib/ess/validation.rb

Instance Method Summary collapse

Instance Method Details

#validate(tag) ⇒ Object



11
12
13
14
15
# File 'lib/ess/validation.rb', line 11

def validate tag
  if tag.text!.strip == ''
    raise InvalidValueError, "the <#{tag.tag_name}> element cannot be empty"
  end
end