It’s an old saying, usually in reference to minors, the earliest recorded reference seems to be in America in 1837.