It is not a matter of distance
Strict trap detection rules, including distance, visibility, etc. is a 3.5e/Pathfinder thing. This approach works poorly within the 5e paradigm.
There is a reason why skill checks gone completely in 5e. Previous editions had the "Search" skill with strict rules about distance (10 feet, iirc). A DM was supposed to use this rules every time a PC might detect a trap. This could look like this:
DM: You see a 50 ft hallway... blah-blah
Player: I use my Search skill to search for traps.
DM: Make a Search skill check.
Player: (rolls poorly)
DM: You didn't find any traps.
Player: I search once more. (rolls great)
DM: You didn't find any traps.
Player: I go 10 feet forward and use my Search skill again.
This example shows two typical problems. The first one is that the DM has to ask for check even if there are no traps at all, because the rules say so. The second one is that the player clearly understands that there still might be traps, he just didn't find it yet because of a bad roll result, so he wants to roll again. Even if the roll was successful, it works only on 10 ft distance, so the player needs to go 10 feet forward and repeat the attempt.
This approach leads to a lot of unneeded rolls, wasting DM's and players' time (and it's real time, not game time). Many modern RPG systems had to rethink priorities, so does 5e. It diverges from the "using skills" mentality, shifting focus to the storytelling. Now it's the consequences that matters:
DM: You see a 50 ft hallway... blah-blah
Player: Do I see any traps?
DM: No you don't, at least not from the place you're standing now.
Player: Okay, I start to moving forward, carefully examining walls, the floor and the ceiling...
DM: Make a Wisdom (Perception) check.
Player: (rolls poorly)
DM: Well, you did notice a trap. The bad news — it's a bit late.. After 20 feet you hear a distinctive "click" under your feet. Make a Dexterity saving throw.
When you have a hallway tightly filled with five similar traps, I suggest you to treat this as one single trap with higher DC. Since your players now make one check instead of five, this might save you time (real time, not game time), allowing your group to spend this time on more interesting and fun things in game. Traps are a tricky game element, which can be quite exciting or very boring. I highly recommend this Angry GM article for more ideas about using traps, making them more interesting.