How do you use the word compulsory as an adjective in a sentence?

Massachusetts became the first state to pass compulsory school attendance laws, and by 1918, all states required children to receive an education.