View Single Post
Old 29th May 2013, 15:39
remy74 remy74 is offline
Junior Member
Join Date: May 2013
Posts: 16
Thanks: 9
Thanked 6 Times in 4 Posts

Hi all,
I have another question about "validators".

At what time does they operate ?
For example :

We use the beforeUpdate to set others SQL, and we use $app->tform->getDataRecord($this->id) to get old informations and compare it to the new to be sure that we need to update it or not.

We have also put some validator on all forms, but the validators returns errors on update (I guess).

But if we try this way, when validators returns errors, the beforeUpdate was already called. And if we use AfterUpdate, the old Data is = new data..

Do we can check with other way the old / new data ? or do we have an option to check all validators beforeUpdate ?

Hope this is clear for who reading this...

For information, the module is in multiple parts :

- Windows service
=> read / write ActiveDirectory / Set Exchange Command
=> read / write to mysql

- ISPConfig module
=> read / write mysql using ISPConfig Class
=> read/ write to others mysql using custom query for command to Windows Service. (with sys_group, sys_userid etc..)

Thanks all in advance
Reply With Quote