mercredi 24 février 2021

How to validate in backend if selected team is not in choosed league

when i creating a match i need to make check that teams are choosed is in selected league.

For exmlp.

selected teams Barcelona and Real Madrid selected league Premier league

So after button save is pushed should appear message that "wrong league selected" or smth like that maybe someone can give suggestions how to create that validation?

there is store methode in controller

 $match = new Match;
         $match->round = $request->round;
         $match->league_id = $request->league;
         $match->home_team_id = $request->home_team;
         $match->away_team_id = $request->away_team;
         $match->match_date = $request->match_date;
         $match->location = $request->location;


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2ZMsW3P
via IFTTT

Aucun commentaire:

Enregistrer un commentaire