Js add required as an option