show_error is not a very unique id ;) Instead we need to pass a span id to the forceMaxLength function as a parameter and make it different for each field e.g. forceMaxLength(this, "description_error", 1024)