An egg producer challenged 2008's Proposition 2, saying it was too vague for farmers because it didn't specify cage size.
But US District Judge John F. Walter said in his ruling it wouldn't require "the investigative acumen of Columbo to determine if an egg farmer is in violation of the statute."
Paul Shapiro of the Humane Society of the United States says in California, this will mostly affect hens, which are typically raised in battery cages:
SHAPIRO:"These are small wire mesh enclosures that are so restrictive, the birds each have less space than a single sheet of paper on which to live for more than a year before they're slaughtered."
Shapiro says the measure will more than double the amount of space for each bird. That's because they're required to have enough room to stretch their limbs, lie down, or turn around.
Starting in 2015, producers have six years to phase in the changes.
Many egg producers opposed the measure four years ago, saying it would raise the production costs and food prices.
The law will affect other states as well, because California will also require all shell eggs sold in the state to come from farms with the same cage standards.