Validation errors - layout

When there’s a validation error, it changes the height of the page due to the addition of the

block used to display the error. For example, from the “Contact” page of the default Yii2 generated template:

<p class="help-block help-block-error">Name cannot be blank.</p>

Is there any way to prevent this from being displayed and to display the errors somewhere else - like in a popup when the user attempts to submit the form?