JS
<SCRIPT>
$('#pass1').on('blur', function () {
if (this.value.length !=0){
if (this.value.length < 3 || this.value.length >8 ) {
alert('Passsword length should be between 3 and 8');
this.value ="";
return false;
}
}
});
</SCRIPT>
HTML
<input type="password" name="password" id="pass1" placeholder="password" />