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