[ic] [error] tag for form submission not functioning for phone number

Zachary Matthews zac@mediapc.com
Tue, 21 Nov 2000 13:29:48 -0800


I have been looking into the [error] tag for order checkout and other 
form submission to understand how it works.  I am wondering why even
thought the construct demo page /ord/checkout has:

    [error name=phone_day std_label="Daytime Phone" required=1]

there is no error notification for the Daytime Phone field when daytime
and evening phone numbers are omitted. (try it yourself -- go to the
checkout page on the demo, and submit the form with phone numbers
omitted.)

I looked into ~/interchange/lib/Vend/Tagref.pm and found some
explanation of how the [error] tag works (BTW, this document seems to
offer good explanation of the different parameters and functionality of
all tags!)  I then looked into
~/catalogs/construct/etc/profiles.order and found some information for
error processing:

fname=required
lname=required
address1=required
city=required
country=required
[if value country =~ /^(US|CA)$/i]
 state=state_province "[value state]" is not a valid US/Canada state or
province.
 zip=postcode "[value zip]" is not a valid US/Canada postal code.
 &or phone_day=phone, phone_night=phone Must have evening or day
phone_number
[else]
 &or phone_day=phone, phone_night=phone Must have evening or day
phone_number
[/else]
[/if]

However, I am not quite sure how this is working (or failing to work
properly) for the phone number.  Can somebody who understands this
please illuminate me?  Is there a mistake in the above code that is not
displaying a proper error when phone numbers are omitted?

Thanks,
Zac