add validation for sub elements