Unless you live in a condo that has a no pets policy, no agreement can actually forbid you to have a pet. Landlords are allowed to ask if you have any pets, and pick a tenant based on what you say, but once you move in you can do whatever you want. I have a cat, lied about it twice and just moved her in anyways.
Typically, a condo association can't deny a service dog access to the property where all the legal requirements have been met. The COA can't ask a person with a disability accompanied by a service animal to provide documentation about their disability or request to instruct the animal to demonstrate its work.
An HOA can enforce pet limits in the community. Your HOA dog rules can have limitations on breed, the number of pets, and maximum size or weight. For example, if the community is comprised of families with a lot of young children, you might want to prohibit dangerous dog breeds, such as pit bulls and rottweilers.
Residents owning or having custody of any dog must license the dog within 15 days of acquisition or within 15 days after the license becomes due. Residents must provide proof of a California approved rabies vaccination to obtain a license (OCCO 4-1-70). Cat licensing is optional and available through OC Animal Care.
Putting a Pet First Courts now have a much clearer direction and will award custody of a pet based on what is deemed best for the animal. They're also able to create shared custody agreements and may enter orders that require one party to care for a pet prior to final ownership determination.
The remaining states allow a household to own one to six dogs. Some states set a limit for all pets in the household, so other animals would be included in this number. California allows a household to own more that the limit of four dogs if they apply for a kennel permit.
What are unenforceable HOA rules? Keep you out of court. Hush up litigation. Discriminate indiscriminately. Enter your home without cause or notice. String you out on the (clothes)line. Fine you for fun. Change rules on the fly. Demand you take down your dish.