Added required attribute
Made separate snippets for various attribute types