Page 1 of 1

Custom Field Issue version 1.1.8

Posted: 31 May 2011, 22:41
by jdw2101
Hi all,

Here's my custom field question. I have a field called "Test Field" that is an enumeration with the values: (select)|1|2|3|4|.
It has a default value of "(select)" with a regular expression field defined as: ^\(select\)$ to prevent the user from saving
with (select) as a value.

The field is set to required (I checked the check boxes) for Update, Resolve, and Close.

I can go the whole way through to Close and never have Mantis warn me that a required field hasn't been filled (note the
field has the "*" indicating it to be required). Is my regular expression wrong or something else?

Thanks in advance.

Re: Custom Field Issue version 1.1.8

Posted: 01 Jun 2011, 05:58
by atrol
The regular expression is only used for string type, not for enumerations.

Re: Custom Field Issue version 1.1.8

Posted: 01 Jun 2011, 13:10
by jdw2101
Is there a way to check against the enumeration?

Re: Custom Field Issue version 1.1.8

Posted: 01 Jun 2011, 14:07
by atrol
You could write a custom validation function
http://www.mantisbt.org/manual/manual.c ... ctions.php
or you could change the source code of MantisBT (this is easier but not recommended by me because you have to check your changes with every update of MantisBT)