Not usually. Counties have different rules although all counties require that buildings be up to code. Is this as to a sliding glass door? My suggestion: call the county and ask exactly what they require.
California Civil Code section 1941.3 covers this issue of dead bolts and security locks. However, this law applies only to buildings that had locked gates before January 1, 1998. Owners don't have to add a locked gate where none existed.
Frank W. Chen has been licensed to practice law in California since 1988. The information presented here is general in nature and is not intended, nor should be construed, as legal advice for a particular case. This posting does not create any attorney-client relationship with the author. For specific advice about your particular situation, consult with your own attorney.
A horizontal sliding door can be used as a main entry door, and would sometimes be excluded from the deadbolt requirement. If the door was installed prior to 1998, it is exempt from the deadbolt requirement, unless or until the door needs to be repaired sometime after 1998. Whether your door needs a different locking mechanism would depend on many circumstances, including what is there now, what could be installed, and what is required by the local building department.