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