Advertisement
vLight

fuel_validation_rules

Feb 3rd, 2014
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.37 KB | None | 0 0
  1. if (Input::get('q')) {
  2.     $validator = Validation::forge('navbar-saerch');
  3.  
  4.     $validator->add_field('q', '', 'required|min_length[4]|max_length[32]');
  5.  
  6.     if($validator->run()) //it always returns FALSE
  7.     {
  8.         var_dump($validator->validated());
  9.     }
  10.     else
  11.     {
  12.         //in every case, it goes here, but the Errors-Array is also always empty
  13.         var_dump($validator->error());
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement