struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gundersen, Richard" <Richard.Gunder...@london-scottish.com>
Subject RE: Date validation
Date Wed, 22 Nov 2006 10:49:03 GMT
This is how I do it:

<constant>
	<constant-name>dateFormat</constant-name>
	<constant-value>dd/MM/yyyy</constant-value>
</constant>
...
...
<field property="dob" depends="date">
...
<var>
	<var-name>datePattern</var-name>
	<var-value>${dateFormat}</var-value>
</var>
</field>

-----Original Message-----
From: vacak [mailto:phusztek@gmail.com] 
Sent: Wednesday, November 22, 2006 10:41 AM
To: user@struts.apache.org
Subject: Date validation


  Hi,

  I use Validator 1.0 and I would like to validate date fields with the
format MM/dd/yy but it works only with the format: MM/dd/yyyy.
In the validation.xml i use this:

  <formset>
         <form name="entryPageForm">
            <field property="reqinitialdate"
                depends="date">
                <arg0 key="entryPageForm.reqinitialdate.displayname"/>
                <var>
                    <var-name>datePatternStrict</var-name>
                    <var-value>MM/dd/yy</var-value>
                </var>
            </field>

So i changed the <var-value> to the format i need but it still doesn't
work.
What could be the problem? And what shall i do if i want to accept the
both
format? (MM/dd/yy and MM/dd/yyyy)

Thanks

-- 
View this message in context:
http://www.nabble.com/Date-validation-tf2684724.html#a7488591
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

*** Disclaimer *** 

This electronic communication is confidential and for the exclusive use of the addressee.
It may contain private and confidential information. The information, attachments and opinions
contained in this E-mail are those of its author only and do not necessarily represent those
of London Scottish Bank PLC or any other members of the London Scottish Group. 

If you are not the intended addressee, you are prohibited from any disclosure, distribution
or further copying or use of this communication or the information in it or taking any action
in reliance on it. If you have received this communication in error please notify the Information
Security Manager at ISM@London-Scottish.com as soon as possible and delete the message from
all places in your computer where it is stored. 

We utilise virus scanning software but we cannot guarantee the security of electronic communications
and you are advised to check any attachments for viruses. We do not accept liability for any
loss resulting from any corruption or alteration of data or importation of any virus as a
result of receiving this electronic communication. 

Replies to this E-mail may be monitored for operational or business reasons. London Scottish
Bank PLC is regulated by the Financial Services Authority.
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message