Each request has it own Validation object which collects errors.From a controller, you access it directly using the validation variable.
Validations ensure that the data has certain values or meet specific requirements.
You can use validation to verify that your models are correct before saving them to the database, or use them directly on HTTP parameters to validate a simple form.
You can still access a subset of the API using static methods of the validation. The validation object maintains a collection of validation. Each error has two properties: You can change this default message and override it for each language of the application.
The %s placeholder will be replaced by the error key.
In this case you need a special trick to keep your errors during the redirect. This will save the errors collection for the next action.