Add support for required attribute to form plugin