assign require attribution to input field code example Example: change input to required jquery $('#input').prop('required',true);