Use contract for MessageBag
Merge pull request #6239 from brightmachine/view-error-message-bag-contract

[5.0] Use Contract For MessageBag