I want to know how to implement a type of validation whereby an error will only occur if both fields have had the exact input before.
For example: if username: Andy Roddick division: New York is already in the database,
username: Andy Roddick division: Texas is fine,
username: Lebron James division: New York is fine,
but username: Andy Roddick division: New York will throw an error.
This is the code i'm using.
$this->validate($request, [
'username' =>'required',
'division' =>'required',
]);
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire