Add set_attributes/optionals validation