Keep the form in the dialog form after submitting it incorrectly

Keep the form in the dialog form after submitting it incorrectly

Hi,

I have this page.

login: miguel@mail.com
pass: m

If you click on "Enviar mensaje" you can see a form. Then, if you leave empty the fields and press "Enviar" the form appears again (more validation errors) but without the modal dialog.

What should i do to keep the form inside the dialog form where there is submit errors?

Regards

Javi