Add valid attribute

Updated all the tests to take advantage of valid_attribute