Wrox Programmer Forums
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Struts section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 21st, 2006, 12:11 PM
Registered User
 
Join Date: Nov 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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






Similar Threads
Thread Thread Starter Forum Replies Last Post
Date Validation aftabn10 PHP How-To 0 January 29th, 2007 10:35 AM
Date Validation ramesh055 ASP.NET 1.0 and 1.1 Professional 1 November 15th, 2006 11:09 AM
date validation (again) crmpicco Javascript How-To 14 March 29th, 2006 06:58 PM
Date Validation surendran Javascript How-To 3 February 25th, 2005 07:40 AM
Date validation Raul Javascript 4 February 25th, 2004 04:04 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.