The best way to get an error message back is to trigger an event based on the result or return a string. The usual reason for using require versus assert is that if require fails, it will refund the remaining gas and revert all changes. On the other hand, assert will use up all the remaining gas before reverting all changes.
A small edit to add, is the recommendation of adding a rejection message to the require, it is optional as of version 0.5.8, but the compilers and jet-brains flags up a warning if you don't, and it may become mandatory in the future,
The syntax is the same though.
assert(myAmount < __someValue);
require(myAmount < __someValue,"Insufficient funds to allow transfer");
And this is pretty good description to help you along: How to use Assert and require