You can do this in different ways, keyup is one of them. But i am giving example below with on change.
$('input[name="vat_id"]').on('change', function() {
if($(this).val().length == 0) {
alert('Input field is empty');
}
});
NB: input[name="vat_id"] replace with your input ID or name.