[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Re: /etc/profiles.order documentation/help
Aaron Kemp writes:
> Hi,
>
> I'm having some trouble with /etc/profiles.order.
>
> I want to check a field for one of two conditions: The field must be
> either blank or match the regex /^45[0-9]{8}$/.
>
> I couldn't find any good documentation on the file profiles.order, but I
> searched the mailing list and found some examples from various people.
> I pieced this together in the hopes that it would work: (Note: I was
> not, at this point, worrying about whether or not it was blank)
>
> [if value po_number =~ /^45[0-9]{8}$/]
> po_good=1
> [/if]
> ...
> po_good=required You must enter a valid PO number
What about:
[if cgi po_number]
po_number=regex ^45[0-9]{8}$ "You must enter ..."
[/if]
Ciao
Racke
--
Prolific Interchange Consulting (Excellent German Quality !).
Take a look at Materialboerse (http://www.materialboerse.de/), WITT
(http://www.witt-weiden.de/), Boxmover (http://shop.boxmover.ch/) or
Passionshop (http://www.passionshop.com/racke). Need a shop ? Contact us.