how to set input required in jquery code example Example: jquery add required $("input").prop('required',true);