What law states that students are required to attend school until graduation or the attainment of age eighteen unless otherwise excused?

339.010¹ School attendance required 

Except as provided in ORS 339.030 (Exemptions from compulsory school attendance):

(1) All children between the ages of 7 and 18 years who have not completed the 12th grade are required to attend regularly a public full-time school during the entire school term.

(2) All children five or six years of age who have been enrolled in a public school are required to attend regularly the public school while enrolled in the public school. [Amended by 1965 c.100 §274; 2012 c.91 §13]

For more information on this question, Ask OSBA.