I'm useless with regex.  However, I found this on the web some time
ago and seemed to match what I needed back then:

<var>
    <var-name>mask</var-name>
    <var-value>^(?:\d+|\d{1,3}(?:,\d{3})*)(?:\.\d{1,2}){0,1}$</var-value>
</var>

This allows them to include the ".00" if they so desire.

hth,
Hubert

On Apr 6, 2005 5:08 PM, Wendy Smoak <[EMAIL PROTECTED]> wrote:
> I have a form with a required "amount".  The users like to enter things like
> $50k which thoroughly confuses the system that tries to send a different
> email if the amount is over or under $25,000.  I think I can make them stop
> entering dollar signs and letters... but I don't think they'll part with the
> commas.
> 
> Before I write a custom validator, am I missing something simple that would
> allow me to accept "40,000" as a valid amount?  The only thing I see is
> integer validation, which is too strict.
> 
> Thanks,
> --
> Wendy Smoak
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to