可以说:Smoking violates the school rules.
Smoking is a violation of school regulations.
Smoking is against / goes against / runs counter to / violates the school rules / the rules of the school.