Morgan said:
Is there a generally accepted technique for client-side email address
validation?
I suppose
<script type="text/javascript">
/**
* Determines whether <code>s</code> is a syntactically
* valid e-mail address according to RFC2822, section 3.4.1.
*
* @param s : string
* Presumed e-mail address.
* @type boolean
* @return
* <code>true</code> if <code>s</code> is syntactically valid,
* <code>false</code> otherwise.
* @author TODO
*/
function isValidEmailAddr(s)
{
return ...
}
function isValidForm(f)
{
return isValidEmailAddr(f.elements['email'].value);
}
</script>
<form action="validate" onsubmit="return isValidForm(this)">
...
<input name="email" ...>
...
</form>
could qualify.
Can someone point me to a good, widely-used and tested script?
That depends on what you expect "e-mail address validation" to be.
Generally, that is unlikely; search the archives.
PointedEars