[rt-users] custom validation on custom fields?

Matt Zagrabelny mzagrabe at d.umn.edu
Fri Oct 28 16:02:23 EDT 2016


Hey Alex,

On Fri, Oct 28, 2016 at 1:58 PM, Alex Hall <ahall at autodist.com> wrote:
> Hi all,
> I've looked through the wiki and the docs, plus on Google, but can't find
> anything about customizing validation. We have two custom fields which may
> be empty or not, but if they have a value, it has to be of the right format.
> Both are single-line text fields. How would I set up RT so that I can apply
> a regular expression, or some other kind of formatting, to these fields?

It should be right there in the CF admin page.

There is even a drop down with some prepopulated options.

The (?# ) is a way to put a "human" name with the validation rule. For instance:

(?#State Abbreviation)^[A-Z][A-Z]$

-m



More information about the rt-users mailing list