At Monday 3/10/2008 12:31 PM, Kenneth Crocker wrote: >To all, > > > We have a Custom Field called "Need-By Date". It is applied > to only a >few Queues. In order to ensure the format entered is consistent, I put >the following "(?#Date)^\d{2}/\d{2}/\d{4}$" into the Validation field. >The result is RT demands an entry as though it is a Mandatory Field. I >only wanted the format to be mandatory so that IF it was entered, it >would require the desired format. Any ideas on how to accomplish this? >Thanks ahead of time. > >Kenn >LBNL
Kenn, Here's what we have for an optional date field (MM/DD/YY format): '(?#Date-Optional MM/DD/YY)^(((0)?[1-9]|1[0-2])\/((0)?[1-9]|[12][0-9]|3[01])\/([12][0-9])?[0-9][0-9])?$', It's the final '?' that makes this optional - without it, the field is mandatory. Steve Stephen Turner Senior Programmer/Analyst - SAIS MIT Information Services and Technology (IS&T) _______________________________________________ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: [EMAIL PROTECTED] Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com