• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
validation for values in array

#1
Hi, 

I am building API with CI v3. 
REST library automatically parses $_POST variable and puts contents in another variable.

I want form_validation library to validate the data I provide not posted ones.
Reply

#2
Easy. For example:

PHP Code:
$data = array(
 
       'username' => 'johndoe',
 
       'password' => 'mypassword',
 
       'passconf' => 'mypassword'
);

$this->form_validation->set_data($data); 

Documented here
Reply

#3
thank you very much!
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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