point is, you should never rely on client-side code to validate forms.

I wholehearetdly agree, our use of javascript in this case is to just to prevent a post if the length is out of bounds with a textarea. when the form gets posted, the real validations take place (a fun place where MS word formatting characters are sanitized and fed to oracle) via perl. We also handle forcing/restricting alpha/numerics, etc I inherited the system (on contract), but given the user requirements, I can't see how it could have been done any other way. (the requirements were specifically for popup warnings, which while annoying save posts to the busy server)

btw, this being an internal business app, we have only have to code to one browser, netscape 4.x and require javascript. a very controlled environment. there are plenty of other reasons on top of what we're discussing that would disqualify it for general net use. :-)


In reply to Re: Re: Re: Regex help by wardk
in thread Regex help by wstarrs

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.