Javascript can be used to do field validation. Try this link to Required field(s) validation. You can only check that something exists in the form fields, not specifically whats there. For example, email addresses. You can check that they are structured correct, but not whether they actually correct and exist.
And you need to start learning how to use a search engine. All the things you are asking about, are available through a simple search. Try a Google search on the string "required field validation". You will get gobs of information beyond the link I provided.