<?php
namespace App\Validation;
use App\Models\BoUserModel;

class IdentRules{

  public function validateEmail(string $str, string $fields, array $data){
    $mBU = new BoUserModel() ;
    $user = $mBU->where('email',$data['email'])->first();
    if(!$user) return false ;
    else return true ;
  }

  public function validateMdp(string $str, string $fields, array $data){
    $mBU = new BoUserModel() ;
    $user = $mBU->where('email',$data['email'])->where('mdp',$data['mdp'])->first();
    if(!$user) return false ;
    else return true ;
  }
}
