required to a select html code example Example: jquery add required $("input").prop('required',true);