# File lib/edi4r.rb, line 379 def validate( err_count=0 ) location = "#{parent.name} - #{@name}" if empty? if required? warn "#{location}: Empty though mandatory!" err_count += 1 end else if rep && maxrep && rep > maxrep warn "#{location}: Too often repeated: #{rep} > #{maxrep}!" err_count += 1 end each {|obj| err_count += obj.validate} end err_count end