validation in javascript for registration form