Debug javascript validation error