validation seprating js