I owe you a big apology because I did not read your post carefully (early in the morning in California). Had I read carefully, I would not have written what I did.
I now understand that your problem is that, having had a formal, written lease for two years, you had some kind of agreement about the third year, and that you left during the third year.
Everything depends on exactly what your agreement was, e-mail, verbal, written or otherwise, and what can be proven about it. I am not a lawyer, but I am a landlord with many years experience, including many trips to court, both small claims and evictions in California.
Small claims judges (including commissioners and judges pro-tem) have wide latitude in deciding what to accept or reject. Thus, your question about will the agreement according to the landlord stand up in court is not something that is definite. If the judge (assuming he is well-meaning, fair, intelligent and experienced) thinks that you had an agreement which obligates you, he may find for the landlord and order you to pay. Sometimes, when the facts are not so clear, he may decide that the landlord is the one who should have been more experienced in such matters and let you off the hook.
But the bottom line is, what exactly was your agreement and what can be proved about it. Evidently, the landlord has at least something to show in court about it.
I see so many postings in this web site about tenants who leave during a lease and what to know if they have to pay for the remainder of the lease, I would like to express a few thoughts, based on practical advice: A lease is an agreement, a promise, and generally, promises have to be kept. Perhaps the landlord rented the premises to you based on the assumption that he would not have to fill a vacancy for a year. Perhaps the price he agreed to depended on a full-years lease. Perhaps there are other reasons. Thus, whatever you agreed to, may be a promise that the landlord depended on, and should be reimbursed for his extra costs and loss of rent.
Here in California (and probably elsewhere) the landlord must try to mitigate his losses by looking for a replacement tenant. He has to really try and not just pretend.
My advice to you, if there was any agreement that you would stay for the full year, would be to call the landlord and ask about how the search for a new tenant is going, and can you help? Is he advertising the property? Has he had any inquiries? If not, you could advertise the property yourself (you would owe the cost of advertising, anyway), perhaps even find a new tenant for him. You could have done that as soon as you gave notice, but that doesn't help you now. I sometimes offer replacement tenants a rent discount to fill another tenant's unused term. The vacating tenant is of course, responsible for the difference, but this is usually preferable to paying the entire rent for several months, especially if the property can be rented out immediatly under these conditions.
I still wish you good luck, but your obligation really depends on exactly what was the agreement between you and the landlord, and what can be proven about it. The landlord has to keep his promises, and so do you.