You can use jQuery.trim
to remove line breaks for start and end. This will make him at least put two characters. As with single character you would remove the line breaks and left with the character.
if ($.trim($('.msgInput').val()).length < 2){
The $.trim() function removes all newlines, spaces (including non-breaking spaces), and tabs from the beginning and end of the supplied string. If these whitespace characters occur in the middle of the string, they are preserved, jQuery doc.