how to make input field as required in jquery code example Example: change input to required jquery $('#input').prop('required',true);