Allows to validate objects based on attributes.