Pass required attribute to input field