The simple, future proof email validation test would be to check the presence of @ symbol In both the cases, pressing the button will submit the parent form without the need for handling the onclick event separately.
This way, if there are multiple errors, correcting them will be easier for the user.
This page shows you to how to add (append) or replace text in a text area or text field.
In the example below, the new text is entered in the left text area and added to the one on the right.
The only way to truly validate the email address is to send an email to that address and request the user to confirm by clicking on a unique link (or entering a confirmation code)Remember, if the user’s intention is to enter an invalid email address, she can do it so easily whether you have the most tough validation or not.
Example: 22934 Returning false from the onsubmit event handler of the form stops the form being submitted.