Yes, it is valid.

Outside the masjid,since the long prayer mats are not equal size ,there are empty space in front of row and no one wants to pray on the bare ground. So is such a prayer valid as the long prayer mats are not equal in size and sometimes the presence of parked cars also cause disruption to the rows

Prayer |