No parent, guardian or other person having control or charge of any child shall be convicted for failure to have said child enrolled in school or for failure to send a child to school or for failure to require such child to regularly attend such school or tutor, or for failure to compel such child to properly conduct himself as a pupil, if such parent, guardian or other person having control or charge of such child can establish to the reasonable satisfaction of the court the following:
(1) That the principal teacher in charge of said school which he attends or should attend or the tutor who instructs or should instruct said child gave permission for the child to be absent; or
(2) That such parent, guardian or other person is unable to provide necessary books and clothes in order that the child may attend school in compliance with law, and that such parent, guardian or other person had prior to the opening of the school, or immediately after the beginning of such dependency, reported such dependent condition to the juvenile court of the county and offered to turn the child over to the State Department of Human Resources as a dependent child; or
(3) That such parent, guardian or other person has made a bona fide effort to control such child and is unable to do so, and files in court a written statement that he is unable to control such child; or
(4) That there exists a good cause or valid excuse for such absence; or
(5) That such parent, guardian or other person has made a bona fide, diligent effort to secure the regular attendance of such child and that the absence was without his knowledge, connivance or consent.
A good cause or valid excuse, as used in this section, exists when on account of sickness or other condition attendance was impossible or entirely inadvisable or impracticable or when, by virtue of the extraordinary circumstances, the absence is generally recognized as excusable.