set required attribute using jquery on all input in div code example Example: jquery add required $("input").prop('required',true);