if (max_count < uploadedImages.length + 1) {
-1 will always be less than the length.
Maybe you want something like
if (max_count != -1 && max_count < uploadedImages.length + 1) {
You are right
this way is working correct
if (max_count != -1 && max_count < uploadedImages.length + 1) {
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community