Hi,
i have a custom Form:
class ContactForm extends Form {...}
which gets passed a Validator
$validator = new RequiredFields('Name', 'Email', 'Comments');
return new ContactForm($this, 'ContactForm', $fields, $actions, $validator);
The validator seems to work because in the Session there are Errors:
array
'errors' =>
array
0 =>
array
'fieldName' => string 'Name' (length=4)
'message' => string '"Name*" wird benötigt.' (length=23)
'messageType' => string 'required' (length=8)
But in Form.php from sapphire the Message() method looks for 'formError' key and so the validation errors arent found in $Message:
$this->message = Session::get("FormInfo.{$this->FormName()}.formError.message");
How comes that the validation errors of the custom Form are stored in 'errors' instead of 'formError' in the SESSION?