You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Ted Husted (JIRA)" <ji...@apache.org> on 2008/01/12 04:02:04 UTC
[jira] Resolved: (WW-2408) date-validator broken
[ https://issues.apache.org/struts/browse/WW-2408?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ted Husted resolved WW-2408.
----------------------------
Fix Version/s: 2.1.1
Resolution: Incomplete
> date-validator broken
> ---------------------
>
> Key: WW-2408
> URL: https://issues.apache.org/struts/browse/WW-2408
> Project: Struts 2
> Issue Type: Bug
> Components: XML Validators
> Affects Versions: 2.0.11
> Environment: wintel
> Java HotSpot(TM) Client VM (build 1.5.0_02-b09, mixed mode)
> TC 5.5.17
> struts-2.0.11
> Reporter: Martin Gainty
> Priority: Minor
> Fix For: 2.1.1
>
>
> <package name="validation" extends="struts-default" namespace="/validation">
> <action name="quizBasic" class="org.apache.struts2.showcase.validation.QuizAction">
> <result name="input">quiz-basic.jsp</result>
> <result>quiz-success.jsp</result>
> </action>
> where quizBasic.jsp contains the following form
> <s:form method="post">
> <s:textfield label="Name" name="name"/>
> <s:textfield label="Age" name="age"/>
> <s:textfield label="Favorite color" name="answer"/>
> <s:textfield label="date" name="date"/>
> <s:submit/>
> </s:form>
> following instructions for configuration of date-validator from tim jee at
> http://struts.apache.org/2.x/docs/date-validator.html
> QuizAction-validation.xml contains the following
> <validators>
> <field name="name">
> <field-validator type="requiredstring">
> <message>You must enter a name</message>
> </field-validator>
> </field>
> <field name="age">
> <field-validator type="int">
> <param name="min">13</param>
> <param name="max">19</param>
> <message>Only people ages 13 to 19 may take this quiz</message>
> </field-validator>
> </field>
> <field name="date">
> <field-validator type="date">
> <param name="min">01/01/1900</param>
> <param name="max">01/01/2099</param>
> <message>invalid date</message>
> </field-validator>
> </field>
> </validators>
> will pass any date thru
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.