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