A similar law takes effect in Alabama in June, and legislation is pending or being considered in Florida, Georgia, Oklahoma and Oregon.