[rt-users] Mandatory Custom Field
Kenneth Crocker
KFCrocker at lbl.gov
Mon Mar 10 17:10:43 EDT 2008
Stephen,
Why does yours have so much code? I just tried adding the '?' at the
end, in front of the '$' and it still doesn't work. Where would I make a
change to yours in order to get 4 positions for year?
Kenn
LBNL
On 3/10/2008 11:06 AM, Stephen Turner wrote:
> 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)
>
>
>
More information about the rt-users
mailing list