Welcome Guest, Not a member yet? Register   Sign In
extending validation
#4

[eluser]dimis[/eluser]
I put at MY_Validation
Code:
function _check_setbox($val) {

       if ( $val !='-1') {
           return TRUE;
       }
else
   {  $this->_error_messages('_check_setbox', 'You must select a value.');
      return FALSE;}
I call it as
Code:
$rules['material']    = "required|_check_setbox($material_id)";
$rules['type']    = "required|_check_setbox($type)";
$rules['collection']    = "required|_check_setbox($collection)";
$fields['collection']= "collection";
$fields['type']= "type";
$fields['material']= "material";
But it does not work


Messages In This Thread
extending validation - by El Forum - 10-02-2008, 05:55 AM
extending validation - by El Forum - 10-02-2008, 06:01 AM
extending validation - by El Forum - 10-02-2008, 06:01 AM
extending validation - by El Forum - 10-02-2008, 06:15 AM
extending validation - by El Forum - 10-02-2008, 06:30 AM
extending validation - by El Forum - 10-02-2008, 06:42 AM



Theme © iAndrew 2016 - Forum software by © MyBB