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



21
22
23
24
25
# File 'lib/ess/validation.rb', line 21

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