Non-Mandatory CF is being required

RT 3.8.7

I must be misunderstanding something, because as I see it, it
appears that defining a validation regexp for a Custom Field
causes that Custom Field to be non-optional.

Name: Occurred Date
Applies to: Tickets
Type: Enter multiple values
Validate: (?#YYYY-MM-DD)^\d\d\d\d-\d\d-\d\d$

Creating a new ticket via the web GUI is rejected with:

 Occurred Date: Input must match [YYYY-MM-DD]

What am I doing wrong? We don’t want this field to be
required. IF it is set to something, it must match
that regexp.

Name: Occurred Date
Applies to: Tickets
Type: Enter multiple values
Validate: (?#YYYY-MM-DD)^\d\d\d\d-\d\d-\d\d$

Creating a new ticket via the web GUI is rejected with:
Occurred Date: Input must match [YYYY-MM-DD]

It must match the regex, so include the optional within it:

(?#Digits)[1]*$

instead of the provided

(?#Digits)[2]+$

for example.

(?#YYYY-MM-DD)^(\d\d\d\d-\d\d-\d\d|)$

Eleanor J. (Piglet) Evans, eje@panix.com
Customer Support, (212) 741-4400


  1. \d. ↩︎

  2. \d. ↩︎

Thanks Eleanor

Duh!On 5/10/2010 2:23 PM, Eleanor J. Evans [Panix Staff] wrote:

On Mon, May 10, 2010 at 02:15:36PM -0400, Jeff Blaine wrote:

Name: Occurred Date
Applies to: Tickets
Type: Enter multiple values
Validate: (?#YYYY-MM-DD)^\d\d\d\d-\d\d-\d\d$

Creating a new ticket via the web GUI is rejected with:
Occurred Date: Input must match [YYYY-MM-DD]

It must match the regex, so include the optional within it:

(?#Digits)[1]*$

instead of the provided

(?#Digits)[2]+$

for example.

(?#YYYY-MM-DD)^(\d\d\d\d-\d\d-\d\d|)$


  1. \d. ↩︎

  2. \d. ↩︎