Jquery – Form validation triggers after required prop is set to false
After setting the required prop to false using $( '#field' ).prop( 'required', false );, form.checkValidity() still returns false on the field and form.reportValidity() tries to focus on the element. An invalid form control with name='' is not focusable. The element…