• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Codeigniter form validation callbacks

#4
[eluser]Dyllon[/eluser]
You could easily extend the form_validation class to do this or alternatively you can add the field name as a parameter to the callback

Code:
$rules = array(
        'field' => 'name',
        'label' => 'Name',
        'rules' => 'callback__check_other[name]'
    )

function _check_other($str, $params) {
//do stuff
}


Messages In This Thread
Codeigniter form validation callbacks - by El Forum - 01-18-2010, 08:32 AM
Codeigniter form validation callbacks - by El Forum - 01-18-2010, 09:11 AM
Codeigniter form validation callbacks - by El Forum - 01-18-2010, 09:28 AM
Codeigniter form validation callbacks - by El Forum - 01-18-2010, 02:16 PM
Codeigniter form validation callbacks - by El Forum - 01-18-2010, 02:36 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.