Answer:
If you are talking about a state legislature, it would need to fall under the state's police power. Generally, it would have to be a subject matter which is proper for a state to regulate, be specific enough so people can be alerted to what conduct is prohibited or required, and it cannot interfere with a constitutional right.