Re: [rt-users] Validation of Custom Fields with Custom Code

2013-11-22 Thread Jeff Blaine

> I would like to validate a custom fields with my own custom code (RT 4.0.7).
> 
> I saw the code in html/Elements/ValidateCustomFields, but there is no
> callback there to implement additional code.
> 
> I'm able to write an error message besides my Custom Field (ID 2) in a
> Callback "Modify.html/Default":
> 
> $m->notes( ('InvalidField-2') => $my_msg );
> 
> But how can I refuse the change of the custom field?

Steffi, I look forward to someone shedding some light on this too.

Right now we are using the Abort() call and requiring the
user to use the browser "back" button. It's very ... 1995.

*I* am not aware of any clean way to do what would be desired
by anyone wanting to do something like this:

Evaluate custom logic at Modify.html submission (and
Update.html!), take no action and redisplay the form
with error message if the logic requirements are not met.


[rt-users] Validation of Custom Fields with Custom Code

2013-11-22 Thread Stefan Rein
Hello,

I would like to validate a custom fields with my own custom code (RT 4.0.7).

I saw the code in html/Elements/ValidateCustomFields, but there is no
callback there to implement additional code.

I'm able to write an error message besides my Custom Field (ID 2) in a
Callback "Modify.html/Default":

$m->notes( ('InvalidField-2') => $my_msg );

But how can I refuse the change of the custom field?

Thannks for anwer.
Steffi.

-- 
   Stefan Rein, mailto: s...@ilk.net
   ILK Internet GmbH, Am Sandfeld 15, D-76149 Karlsruhe
   Tel. +49 (0) 721 9100-0, Fax -191, http://www.ilk.net
   Geschaeftsfuehrer: Matthias Felger, AG Mannheim, HRB 107037