Bug fixes and improvements

Bug fix: Spaces at the beginning or end of the validations set the
appearance of a conflict of validation error.
Bug fix: Only an error message at the same time is presented for each
field
Improvement: Improves how to construct the DOM elements for error
messages.
Improvement: The error message will appear after the last item in a
group.
Improvement: Added the error message for the icon display type in the
title attribute of the icon.