js validation error fix