Dear Miyoshi,
this is the code wo we write:
(function($) {
$(document).ready(function(){
//bmo scroll to not valid
$(“.wpcf7”).on(‘invalid.wpcf7’,function(e){
$(‘html, body’).animate({
scrollTop: $(“.wpcf7-not-valid”).first().offset().top-200
}, 1400);
});
});
})(jQuery);