TRUNK-2280: User friendly error message is displayed when number of characters exceed 1024

User friendly error message is displayed when number of characters exceed 1024
@wluyima I have made the change as suggested. Please refer to the pull request here: https://github.com/openmrs/openmrs-core/pull/1226 :)