Added message validation.
Merge pull request #1 from 6vasia/master

Added message validation.