<script src="http://code.jquery.com/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
$('form').submit(function(){
if($('input[type="text"]').val().length >=25){
return true;
}
return false;
});
});
</script>
<form action="" method="post">
<input type="text" />
<input type="submit" />
</form>