R 406.4.2 A drain shall be placed around the perimeter of a foundation that consists of gravel or crushed stone not more than 10% that passes through a number 4 (4.75 mm) sieve. The drain shall extend a minimum of 12 inches (305 mm) beyond the outside edge of the footing. The thickness shall be that the bottom of the drain is not higher than the bottom of the base under the floor.And that the top is not less than 6 inches (152 mm)  above the top of the footing. The top of the pipe shall be covered with not less that 2 inches (51mm) of gravel or crushed stone. And shall be covered with not less than 6 inches of the same material. The drain shall be covered with an approved filter material. The foundation perimeter drain shall be discharged by gravity into an approved drainage system that complies with the building plumbing subcode.