Dina777,
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
</head>
<body>
<input type="text" class="form-control" />
<button>Check</button>
<script>
$('button').click(function() {
var result = $('.form-control').val().trim().split(' ');
var msg = (result.length > 3 || result.length < 3 ) ? 'Некорректные данные' : result.toString();
alert(msg);
});
</script>
</body>
</html>