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


Groups > comp.lang.javascript > #18123

How can I validate this with regular expression

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder2.hal-mli.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail
From "Tony" <tony.johansson@inport.com>
Newsgroups comp.lang.javascript
Subject How can I validate this with regular expression
Date Thu, 17 Jan 2013 12:29:22 +0100
Organization A noiseless patient Spider
Lines 1
Message-ID <kd8naj$6pg$1@dont-email.me> (permalink)
Mime-Version 1.0
Content-Type text/plain; format=flowed; charset="iso-8859-1"; reply-type=original
Content-Transfer-Encoding 7bit
Injection-Date Thu, 17 Jan 2013 11:29:23 +0000 (UTC)
Injection-Info mx04.eternal-september.org; posting-host="04290fff4557273ca84c3ad616751e0b"; logging-data="6960"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/1RDAYCq5ujZg9lXA1gie/KRr5AFm8+b4="
X-MimeOLE Produced By Microsoft MimeOLE V15.4.3555.308
X-Newsreader Microsoft Windows Live Mail 15.4.3555.308
Importance Normal
Cancel-Lock sha1:ixdku3d5Ox3NWVdjyvheo3Q5s/s=
X-Priority 3
X-MSMail-Priority Normal
Xref csiph.com comp.lang.javascript:18123

Show key headers only | View raw


Hello!

I'm new to JavaScript and JQuery.
Have earlier worked with ASP.NET.
I have this html input
<input type="text"  name="depthBow" id="txtDepthBow" size="20"  />

I have written this addMethod that should validate the format but I have two 
questions.
1. Where should this be put.
2.When will this be called

As I said this is new to me.

  $.validator.addMethod('txtDepthBow', function (value)
            {
                return /^(\d{1,2}(\.d{1,2})?)$/.test(value);
            }, 'Wrong input.');

//Tony 

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


Thread

How can I validate this with regular expression "Tony" <tony.johansson@inport.com> - 2013-01-17 12:29 +0100
  Re: How can I validate this with regular expression Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-01-17 13:46 +0100
    Re: How can I validate this with regular expression John G Harris <niam@jghnorth.org.invalid> - 2013-01-17 14:41 +0000
  Re: How can I validate this with regular expression Gregor Kofler <usenet@gregorkofler.com> - 2013-01-17 16:45 +0100
  Re: How can I validate this with regular expression Danny <dann90038@gmail.com> - 2013-01-18 13:00 -0800
    Re: How can I validate this with regular expression "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-01-19 15:19 +0100

csiph-web