Login Retreive lost passwordRegister
Search

Forum Index / General / About the news - update custom validator

[ This topic is solved ]

  Iyas 17 November 11 / 04:52  
"01 November 2011 - update custom validator

As of FH3 v1.3.2 a second argument is passed to a custom validator containing the FormHandler object.
This way you can use methods of that object to check other fields."
========================================================

Could you please explain further in the manual. eg. the sample code.

Currently you've mention the update in the manual, but no sample code.
Sorry, I'm a bit slow :)

  Johan Wiegel (Admin) 25 November 11 / 12:23  
It just means that you can do something like this in a validation function

<?php
function checkChange$value$oForm )
{
    
$value <> $oForm->dbGetValue'fieldname' )
    {
        
rerurn true;
    }
    else
    {
         return 
'You must change the field ...';
    }
}
?>

  Top


powered by PHP-GLOBE   © 2004 - 2012 FormHandler. All rights reserved.   -   Open source license