JRS: In article <11**********************@i42g2000cwa.googlegroups .com>
, dated Fri, 4 Aug 2006 20:22:22 remote, seen in
news:comp.lang.javascript, Gregc. <gr*********@bigpond.composted :
>I am a newbie to JavaScript and programming. I am trying to Vaildate a
form that contains name, address, email etc.
Don't fool yourself into thinking that an E-mail address can be fully
validated, or that it is worth attempting a detailed format check. I
see no sense in doing more than to check that the field contains
something which looks like an attempt at an E-address - RegExp
/.+@.*\..+/ for example.
Don't assume, except for local use, that postal address patterns match
your local usage.
Don't assume that names consist only of letters and spaces : "Alfred,
Lord Tennyson" and "Alfred Lord Tennyson" are two quite different
people.
Read the newsgroup FAQ, and <URL:
http://www.merlyn.demon.co.uk/js-
valid.htm>.
>I was wondering if it is possible to have a function within a function
ie
i.e.
>Function validateForm() {
Function validate emailaddress{
code
}
}
Could someone direct me in the right direction.
Provided that you write it "function" and omit the erroneous space, yes.
--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/>? JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htmjscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/TP/BP/Delphi/jscr/&c, FAQ items, links.