Suppose I have two forms in two columns on a single page. Each form has a couple of input fields and a submit button, and each form has a route where it calls a specific function in the controller. Each function verifies the inputted values with Laravel's Validation call ($this->validate($request, [....]);), which means if the validation fails it reloads the page with an available $errors value.
The issue I'm having, however, is I don't know how to properly tell from which form $errors currently contains, nor do I know if I can possibly rename $errors into more unique values. I'm looking for a way to do this because for each form I was hoping to "target" the error message within each specific column.
Does anyone know how to approach this problem?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire