• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using non request variable in validation.

#1
Can I create new variable inside controller that will be used in validation placeholder?



PHP Code:
$id 1//this way or by adding request variable
$_POST['id'] = 1//this doesn't seems to work.
$validation->setRules([
    'email' => 'required|valid_email|is_unique[users.email,id,{id}]'
]); 

I can't figure it out and also wasn't able to find any answers.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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