js validation failling fixed