javascript validation file