I **know** I'm missing something here.. but
I'm following through the form-validation
docs and it seems easy.. but everytime I
run this pipeline I get sent to the error
page and the xsp-formval:on-xxx calls dont
seem to be give me the expected output even
when there is an error.
Can someone please have a look at this
and point out what I'm missing? I've been
staring at this and the docs for a while
and it's driving me crazy.. because it looks
to me like it should work.
-----------------
Sitemap:
<map:match pattern="mail/send.html">
<map:act type="auth-protect">
<map:parameter name="handler" value="authhandler"/>
<map:act type="form-validator">
<map:parameter name="descriptor"
value="send_descriptor.xml"/>
<map:parameter name="validate-set" value="send-email"/>
<map:generate type="serverpages" src="mail/send_ok.xsp"/>
<map:transform src="skins/{global:skin}/main.xsl"/>
<map:serialize type="html"/>
</map:act>
<map:generate type="serverpages" src="mail/send_error.xsp"/>
<map:transform src="skins/{global:skin}/main.xsl"/>
<map:serialize type="html"/>
</map:act>
</map:match>
Descriptor:
<root>
<parameter name="email_to" type="string"
matches-regex="^[\d\w][\d\w\-_\.]*@([\d\w\-_]+\.)\w\w\w?$"
nullable="no"/>
<constraint-set name="send-email">
<validate name="email_to"/>
</constraint-set>
</root>
send_error.xsp (snippet):
<xsp-formval:on-nomatch name="email_to">
OUCH! No email_to!?
</xsp-formval:on-nomatch>
DONE!
-----------------
Well.. no matter what I put in my email_to text field,
I get sent to the error page. I tried changing the validation
to just nullable="no" with no regexp and changing
the xsp-formval:on-nomatch to on-notpresent and on-null.
I'm sure I'm missing something.. but by comparing this
to the doc.. I just dont see whats missing.
Thanks,
- Brent
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]