validation – Validate form in page in modal window

I need to create a form validation system showing the errors in a modal window, not by alerts, but I can’t find anything.

The form is handmade on a normal WordPress page and I want that when the form is submitted the fields are checked via javascript and if there are errors a modal window are opened specifying which are those errors and, obviously, stopping the submit.

Any help would be greatly appreciated

Thanks in advance.