add has_attribute and the option required for attribute