(a) On granting an injunction, the court or judge must require an undertaking on the part of the applicant to the effect that the applicant will pay to the party enjoined any damages, not exceeding an amount to be specified, the party may sustain by reason of the injunction, if the court finally decides that the applicant was not entitled to the injunction. Within five days after the service of the injunction, the person enjoined may object to the undertaking.
If the court determines that the applicant's undertaking is insufficient and a sufficient undertaking is not filed within the time required by statute, the order granting the injunction must be dissolved.