Hi,
I've this validation on my model:
public function validation()
{
$this->validate(new PresenceOf(array(
'field' => 'autor',
'message' => 'The name is required'
)));
if ($this->validationHasFailed() == true) {
return false;
}
}
The user submits a form on a page with this URL: https://www.domain.com/backoffice/authors/edit/4/
When the validation fails, the user is redirected to this URL (notice the "id" parameter name): https://www.domain.com/backoffice/authors/edit/id/4/
How can I change this redirect? Or how can I get the value of the "id" parameter without creating a route rule for this?
Thank you.