-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add overwrite message support to the ValidationResult #78
Add overwrite message support to the ValidationResult #78
Conversation
$this->assertEquals($expected, $result->getMessages()); | ||
} | ||
|
||
public function testMessagesWillBeInheritedFromDefaultContext() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is no longer a use-case, since the messages will always be overwritten from the validation result. This decreases the complexity, which is another plus of this feature.
…re/overwrite-result-messages
Ok, I have an issue with this for the following feature: #80. Now the specific messages are set on the validation result. But in the |
After a log discussing with @rskuipers we decided that overwriting the messages in a template file is not going to work with functionality like output. Therefor I decided to close this PR, and start to work on the output functionality instead. The validation result class is still a nice improvement, but overwriting the messages still needs to be done on validator level. |
What
This PR adds support to overwrite validation messages on the validation result. This could come in handy overwriting validation messages in a view (when using MVC).
How to test
ToDo
->overwriteMessages()
from theValidator
class.