adds validation of required attributes

Use empty lines between defs.