[rt-users] CF Validation

Raed El-Hames Raed.El-Hames at vialtus.com
Fri Aug 6 09:22:40 EDT 2010


Hi;

RT-3.8.7


Can some one give me a brief explanation of how custom field validation works through the code.
I tracked back as far as lib/Record.pm :: _AddCustomFieldValue;

However I am not sure how/where the following happens:
unless ( $cf->ValidateValue( $args{'Value'} ) ) {
        return ( 0, $self->loc("Invalid value for custom field") );
}

I cannot find ValidateValue any where !!??

The reason for my question is the need to create my own CF validation pattern I would like to extend
'(?#Year)^[12]\d{3}$',
To also include hours and minutes,
so values to my custom field should be yyyy-mm-dd hh:mm

Is this possible and how?

Regards;
Roy


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20100806/4fea0ffa/attachment.htm>


More information about the rt-users mailing list