[rt-users] FW: CustomField input must match formatting in edit

Brent Wiese bwiese at ElementPS.com
Tue Feb 7 11:54:43 EST 2012


> 
> On Mon, Feb 06, 2012 at 04:54:51PM -0700, Brent Wiese wrote:
> > Sorry, wasn't sure if a screenshot would come through on the list.
> 
> The layout of that field could use some loving, it has a CSS class
> these days so it should be much easier to do things to it:
> cfinvalidfield

Yeah, I played a little with that CSS, but since it was inconsistent between different types of fields, and IIRC (yesterday is a blur at this point), that CSS is also used on the create ticket, I was hoping there was another solution or a bug in the modify html page that I was too blind to see that could be corrected. It was a long (and productive thanks to the awesome structure of RT) day of coding.

> > Maybe a different topic, but while debugging the formatting above, I
> > noticed if I use a * in a custom field validation (ie: I want to
> allow
> > the field to contain only digits or be empty, so I modified the regex
> > from ^[\d.]+$ to ^[\d.]*$), the validation works, but it doesn’t
> > display the “Input must match…” text at all.
> 
> RT decides whether or not display the hint by validating all the CFs at
> page render time.  This means that since * matches the empty field, it
> doesn't have an error hint to show.
> 
> Frankly - it'd probably be a lot better if we just started showing the
> Description of Custom Fields as a Hint box on 4.2.

That makes sense, but it'd be nice if it rendered the comment in the validation regardless of whether it validated the regex. Or, as you suggest, show the CF description.

Thanks again!
Brent


More information about the rt-users mailing list