Refactor how to validate parent attr