If any officer or person, who becomes charged under this chapter with any duty relating to an enrollment of persons subject to military duty, refuses or neglects to perform the same within the time and substantially in the manner required by law, or if he or she shall knowingly make any false certificate, or if, when acting as county or assistant enrolling officer, he or she shall knowingly or willfully omit from the roll any person required by this chapter to be enrolled he or she shall thereby forfeit not less than one hundred nor more than five hundred dollars, to be sued for in the name of the state of Washington by the prosecuting attorney of the county in which such offense shall occur, the amount of the penalty to be determined by the court, and, when recovered, to be paid into the general fund of the state.