Hi Pranay Kondai,
You can use javaScript...
$('.validatetext').keyup(function(e){
var $parentDiv = $('.validatetext').closest('.validatetext');
var mytext = $parentDiv.find('.form-control').val();
var alphanumers = /^[a-zA-Z0-9]+$/;
length = mytext.length-1;
if(!alphanumers.test(mytext)){
$parentDiv.find('.form-control').val( mytext.substr(0,length));
}
});