Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #17772

Question on form validation

Newsgroups comp.lang.javascript
Date 2012-12-19 06:57 -0800
Message-ID <be8abd23-af86-48c7-be3f-a751ce6e574f@googlegroups.com> (permalink)
Subject Question on form validation
From bravesplace@gmail.com

Show all headers | View raw


I use the following to determine if a field is blank and to alert them the field is required:

if (Form1.FieldName.value == "")
  {
    alert("Please enter a value for the  FIELDNAME field.");
    Form1.FieldName.focus();
    return (false);
  }

How can I use a LIKE type of statement so if they use a word we cannot allow such as "Stupid", I can advise them the word is not permitted?

Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Question on form validation bravesplace@gmail.com - 2012-12-19 06:57 -0800
  Re: Question on form validation Stefan Weiss <krewecherl@gmail.com> - 2012-12-19 16:20 +0100
  Re: Question on form validation Danny <dann90038@gmail.com> - 2012-12-19 13:38 -0800
  Re: Question on form validation Mike Filbin <michael.filbin@gmail.com> - 2012-12-31 16:07 -0700
    Re: Question on form validation Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-01-01 01:58 +0100
      Re: Question on form validation "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-01-01 11:35 +0100

csiph-web