<script>
$(document).ready(function(){
$('.button').click(function(){
var text = $('#text').val();
if( /[^a-z]/.test(text)){
$('#text').after('Something is wrong');
return false;}
else {
var text1 = $('#text1').val();
if( /[^a-z]/.test(text1)){
$("#text1").css('border', 'red 1px solid');
$('#text1').after('Something is wrong');}
else {
var text2 = $('#text2').val();
if( /[^a-z]/.test(text2)){
$("#text2").css('border', 'red 1px solid');}
}
}
});
});
</script>