i used this code for show text box error in span.
now i want return status - true or false based on showing message
if ($('#Code-Id').val().trim() < 2) {
$('#Code-Id').siblings('span.error').css('visibility', 'visible');
}
else {
$('#Code-Id').siblings('span.error').css('visibility', 'hidden');
}