I have in my volt template...
{{ this.flashSession.output() }}
{{ form.messages('username') }}
{{ form.messages('password') }}
{{ form.messages('confirmPassword') }}
This is in the form file...
public function messages($name)
{
if ($this->hasMessagesFor($name)) {
foreach ($this->getMessagesFor($name) as $message) {
$this->flash->error($message);
}
}
}
It seems I have to put a form.messages for every field in the form or they wont print/render. My flash is using DI direct and I have a DI flashSession setup for use before redirects too.
Is there an easier way in volt to just loop through ALL available form.messages IF they exist and print/render them?