freeman701

Index Page

Dec 4th, 2021
1,016
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. require "autoload.php";
  4.  
  5. $rules = [
  6.     'email' => 'required|email',
  7.     'password' => 'required|min:8'
  8. ];
  9. $data = [
  10.     'email' => 'joost@tutsplus.com',
  11.     'password' => 'sasa8asa'
  12. ];
  13.  
  14. $validator = new Vendor\App\Validator();
  15.  
  16. if ($validator->validate($data, $rules)) {
  17.  
  18.     $joost = new Vendor\App\Admin($data);
  19.    
  20.     echo '<pre>';
  21.     var_dump($joost);
  22.     echo '</pre>';
  23.  
  24. } else {
  25.     die($validator->getErrors());
  26. }
RAW Paste Data