Re: custom validation on custom fields?

Matt Zagrabelny <[email protected]>
Newsgroups gmane.comp.bug-tracking.request-tracker.user
Message-ID <CAOLfK3X4-s3MwPZ0-nGtNSoK1-wkuTHe71FHP1z7SkV=cPz4PA@mail.gmail.com>
Hey Alex,

On Fri, Oct 28, 2016 at 1:58 PM, Alex Hall <[email protected]> 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
---------
RT 4.4 and RTIR training sessions, and a new workshop day! https://bestpractical.com/training
* Los Angeles - Q1 2017
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.