Okay, well here's a nice and simple example with the email field.
<label for="email" class="label">Email:</label><input name="email" id="email" type="text" class="textfield">
No change there.
The validate method needs jQuery, so you can use and external CDN to retrieve the scripts or you can host them yourself.
A standard way to say that the email is required, is as follows:
We're wanting something extra though. When someone has entered their email, we want to do a special check to see if that email already exists, We can use the PHP code to check if the email already exists:
Details about the remote check can be found at the remote method documentation page.