I have a contacts form (see attached), which I require the addition of form validation on submit. The validation rules are as follows:-
1) On page load the form already contains 1 empty line. The script must allow the form to submit when only 1 line is present and both input fields are empty. If however the user enters an entry for 1 of the 2 input fields on this line, validation per the requirements below will take effect.
2) All entered contacts (input lines) that are added to the form (with the given exception stated above) need to independently be validated so that no input is left empty, and to make sure email addresses are entered in a valid email format.
3) The name field must contain less than 100 Characters, and the email field less than 150 Characters.
4) The validation script must make it obvious to the user which field (and on which line) needs attention (via hi-lighting/coloring of the input or similar), and by also including a text notice next to the 'FINISH' button that states 'You must correct the errors below before you can continue'.