Fixing validation logic to validate sub-entities as well as constraints on parent