Password length validation in javascript