validate numeric range 6-10 digits

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rob Wahmann

    validate numeric range 6-10 digits

    Not sure if my first message went through because of the attachment...

    I'm currently using formchek.js to validate various form fields, however, I
    cannot figure out how to validate a field with a numeric range of 6-10
    digits. I apologize in advance for asking such a question since I'm using
    formchek.js, but my strength is server-side programming not JavaScript. I
    appreciate any tips or advice you can provide!

    TIA - Rob


  • Rob Wahmann

    #2
    Re: validate numeric range 6-10 digits

    I'm willing to pay if someone could help me figure out these two functions.
    I know one is already written but I don't know how to call it. The other
    check is to make sure the field has 6-10 digits within it. I'd like to keep
    everything wrapped up in the formchek.js file if possible. Let me know if
    you can help!

    Thanks!

    Rob


    Comment

    • Evertjan.

      #3
      Re: validate numeric range 6-10 digits

      Rob Wahmann wrote on 09 feb 2004 in comp.lang.javas cript:[color=blue]
      > I'm currently using formchek.js to validate various form fields,
      > however, I cannot figure out how to validate a field with a numeric
      > range of 6-10 digits. I apologize in advance for asking such a
      > question since I'm using formchek.js, but my strength is server-side
      > programming not JavaScript. I appreciate any tips or advice you can
      > provide![/color]

      <script type="text/javascript">

      function testfor6210digi ts(x){
      return /^\d{6,10}$/.test(x)
      }

      alert(testfor62 10digits("01234 56")) // true
      alert(testfor62 10digits("01234 567890")) // false
      alert(testfor62 10digits("0123a bc")) // false
      alert(testfor62 10digits("123") ) // false

      </script>
      [color=blue]
      > I'm willing to pay if someone could help me[/color]

      me !!!


      --
      Evertjan.
      The Netherlands.
      (Please change the x'es to dots in my emailaddress)

      Comment

      • Rob Wahmann

        #4
        Re: validate numeric range 6-10 digits

        Do you have an email address I can reply to?

        Rob

        "Evertjan." <exjxw.hannivoo rt@interxnl.net > wrote in message
        news:Xns948AAB3 DAB365eejj99@19 4.109.133.29...[color=blue]
        > Rob Wahmann wrote on 09 feb 2004 in comp.lang.javas cript:[color=green]
        > > I'm currently using formchek.js to validate various form fields,
        > > however, I cannot figure out how to validate a field with a numeric
        > > range of 6-10 digits. I apologize in advance for asking such a
        > > question since I'm using formchek.js, but my strength is server-side
        > > programming not JavaScript. I appreciate any tips or advice you can
        > > provide![/color]
        >
        > <script type="text/javascript">
        >
        > function testfor6210digi ts(x){
        > return /^\d{6,10}$/.test(x)
        > }
        >
        > alert(testfor62 10digits("01234 56")) // true
        > alert(testfor62 10digits("01234 567890")) // false
        > alert(testfor62 10digits("0123a bc")) // false
        > alert(testfor62 10digits("123") ) // false
        >
        > </script>
        >[color=green]
        > > I'm willing to pay if someone could help me[/color]
        >
        > me !!!
        >
        >
        > --
        > Evertjan.
        > The Netherlands.
        > (Please change the x'es to dots in my emailaddress)[/color]


        Comment

        • Evertjan.

          #5
          Re: validate numeric range 6-10 digits

          Rob Wahmann wrote on 09 feb 2004 in comp.lang.javas cript:[color=blue]
          > Do you have an email address I can reply to?
          > "Evertjan." <exjxw.hannivoo rt@interxnl.net > wrote in message[color=green]
          >> (Please change the x'es to dots in my emailaddress)[/color][/color]


          --
          Evertjan.
          The Netherlands.
          (Please change the x'es to dots in my emailaddress)

          Comment

          • Dr John Stockton

            #6
            Re: validate numeric range 6-10 digits

            JRS: In article <9BEVb.3663$PY. 1392@newssvr26. news.prodigy.co m>, seen
            in news:comp.lang. javascript, Rob Wahmann <rob@dotcomstud io.biz> posted
            at Mon, 9 Feb 2004 05:08:21 :-
            [color=blue]
            >Not sure if my first message went through because of the attachment...[/color]

            Attachments are unwelcome, or worse.
            [color=blue]
            >I'm currently using formchek.js to validate various form fields, however, I
            >cannot figure out how to validate a field with a numeric range of 6-10
            >digits. I apologize in advance for asking such a question since I'm using
            >formchek.js, but my strength is server-side programming not JavaScript. I
            >appreciate any tips or advice you can provide![/color]

            formchek.js not known.

            OK = /^\d{6,10}$/.test(field)

            <URL:http://www.merlyn.demo n.co.uk/js-valid.htm>

            --
            © John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 IE 4 ©
            <URL:http://jibbering.com/faq/> Jim Ley's FAQ for news:comp.lang. javascript
            <URL:http://www.merlyn.demo n.co.uk/js-index.htm> jscr maths, dates, sources.
            <URL:http://www.merlyn.demo n.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.

            Comment

            Working...