added support for "required" attribute and ngRequired directive