How to validate form during the filling of the fields?

Hello, please tell me how to correct the code so that during filling form fields there is a check immediately and when you press the "Send" button, nothing happened until all fields are filled correctly?
Also, if nothing were to happen, if the fields are empty initially.

HERE IS the CODE: https://codepen.io/Dragon1590/pen/QOPKzq
June 10th 19 at 16:32
3 answers
June 10th 19 at 16:34
Use for Edith handler for the event "onkeypress='...'", and in it use the f-th validation.

If the user fills something is not correct, it is possible the button to assign the error class to do type checking "if the button has the class error, nothing to send or even lock button(enabled)".
June 10th 19 at 16:36
Make the code validate data entered in a separate function, pull it when sending, and event input. Somehow so.
Thank you, your solution is perfect for my needs! - Dylan.Jenki commented on June 10th 19 at 16:39
June 10th 19 at 16:38
Well you all with this validation for you!)) Did not read carefully the old html5 validation forms?
There are also all already: required, pattern. What else is missing?))

Find more questions by tags jQueryJavaScript