Does your spouse have to be on the title to qualify for the capital gains exclusion? Or is filing jointly on our taxes enough?

I purchased a home in 2008 in California. I was single then and only one in deed. I'm now selling the property and married. Does my spouse need to be on the title to qualify for the $500,000 tax exclusion? Or is filing jointly enough?