
997 P.2d 461 (2000)
100 Wash.App. 506
STATE of Washington, Respondent,
v.
Joseph C. MARKING, Appellant.
No. 24655-4-II.
Court of Appeals of Washington, Division 2.
April 21, 2000.
*462 Randall Avery Sutton, Kitsap County Deputy Pros. Atty., Port Orchard, for Respondent.
Thomas E. Weaver, Law Office of Wecker Hunko Bougher (Court Appointed), Port Orchard, for Appellant.
SEINFELD, J.
Joseph C. Marking appeals his jury conviction for violation of a domestic violence no-contact order. We find invalid a pretrial no-contact order that fails to inform the person subject to it that consent is not a defense to a charge of violating the order. Here, the order was invalid and, thus, the evidence of the crime was insufficient. Consequently, we reverse.

FACTS
On June 15, 1998, the Kitsap County District Court entered a domestic violence no-contact order prohibiting Marking from attempting to contact his wife, Elizabeth Marking, for the next two years. Nonetheless, Elizabeth and Joseph agreed to meet at Elizabeth's place of employment. This meeting led to an altercation to which the police responded.
City of Poulsbo Police Officer Romaine ran a warrants check on Marking and learned of the no-contact order. After confirming that Marking had knowledge of the order, Romaine arrested him and, subsequently, the State charged him with one count of assault in violation of a no-contact order.
At trial, Marking attempted to elicit Romaine's testimony about Marking's comments at the time of the arrest. The comments indicated that Marking believed he was not in violation of the court order because Elizabeth had consented to the contact. The State objected, arguing that because consent is not a defense to violation of a no-contact order, the evidence was irrelevant. The trial court sustained the objection.
After the State rested, Marking moved to dismiss on the grounds that the no-contact order was invalid. He argued that the order lacked the essential notice set forth in RCW 10.99.040(4)(d), which informs the person subject to the no-contact order that consent *463 is not a defense to violation of such order. After considering the matter, the trial court denied the motion, reasoning that this language was advisory rather than mandatory.
The jury found Marking not guilty of the charged offense of assault in violation of a no-contact order, but it found him guilty of the lesser included charge of violation of a no-contact order.[1] Marking appeals.

DISCUSSION
Marking alleges that (1) the no-contact order was facially invalid and, thus, the trial court erred in denying his motion to dismiss the charge; and (2) the trial court erred in not allowing the introduction of evidence about his belief in the validity of a consent defense.
In domestic violence situations, a trial court may impose a no-contact order pretrial, RCW 10.99.045, or post-conviction, RCW 10.99.050. See State v. Anaya, 95 Wash.App. 751, 754, 976 P.2d 1251 (1999). Each statute sets forth different requirements as to the proper form of the order. The parties agree that the order here was issued pretrial.
When issuing a pretrial no-contact order, the trial court must follow the procedures set forth in RCW 10.99.040. RCW 10.99.045(5). RCW 10.99.040(4)(d) states:
The written order releasing the person charged or arrested shall contain the court's directives and shall bear the legend: "Violation of this order is a criminal offense under chapter 10.99 RCW and will subject a violator to arrest; any assault, drive-by shooting, or reckless endangerment that is a violation of this order is a felony. You can be arrested even if any person protected by the order invites or allows you to violate the order's prohibitions. You have the sole responsibility to avoid or refrain from violating the order's provisions. Only the court can change the order."
Because Marking did not challenge the no-contact order when the district court issued it, the State argues that his objection to it now is an improper collateral attack. We disagree.
The validity of a protective order is an implicit element of the crime of violation of such order. See City of Seattle v. Edwards, 87 Wash.App. 305, 308, 941 P.2d 697 (1997) (discussing protective order issued pursuant to RCW 26.50.060(2)). Notwithstanding Marking's failure to challenge the order in district court, the State bore the burden at trial of proving the validity of the order beyond a reasonable doubt. Edwards, 87 Wash.App. at 308, 941 P.2d 697.
Thus, the determinative issue here is not the validity of the order per se, but rather whether the State proved beyond a reasonable doubt that the order was valid. Edwards, 87 Wash.App. at 307-309, 941 P.2d 697. "Due process requires the government to prove every element of a charged offense." Edwards, 87 Wash.App. at 307, 941 P.2d 697 (citing State v. Lively, 130 Wash.2d 1, 11, 921 P.2d 1035 (1996)). "Due process also requires the government to provide fair warning that the charged act constitutes a crime." Edwards, 87 Wash.App. at 307-08, 941 P.2d 697 (citing State v. Becker, 132 Wash.2d 54, 61, 935 P.2d 1321 (1997)).
The validity of the no-contact order here turns on whether the warning language set forth in RCW 10.99.040(4)(d) is mandatory or discretionary.[2] The critical language *464 provides that an order issued pursuant to RCW 10.99.045 "shall" bear a consent warning. RCW 10.99.040(4)(d).
"[T]he word `shall' in a statute is presumptively imperative and operates to create a duty." State v. Martin, 137 Wash.2d 149, 154, 969 P.2d 450 (1999) (citing State v. Krall, 125 Wash.2d 146, 148, 881 P.2d 1040 (1994); Erection Co. v. Department of Labor & Indus., 121 Wash.2d 513, 518, 852 P.2d 288 (1993)). "`[S]hall' imposes a mandatory requirement unless a contrary legislative intent is apparent." Martin, 137 Wash.2d at 154, 969 P.2d 450 (citing Krall, 125 Wash.2d at 148, 881 P.2d 1040; Erection Co., 121 Wash.2d at 518, 852 P.2d 288). But as a reviewing court, we do not rely on a statute's use of the word "shall" alone; we strive also to "ascertain legislative intent of the statute as a whole." Krall, 125 Wash.2d at 148, 881 P.2d 1040.
In determining the meaning of the word "shall" we traditionally have considered the legislative intent as evidenced by all the terms and provisions of the act in relation to the subject of the legislation, the nature of the act, the general object to be accomplished and consequences that would result from construing the particular statute in one way or another.
Krall, 125 Wash.2d at 148, 881 P.2d 1040 (quoting State v. Huntzinger, 92 Wash.2d 128, 133, 594 P.2d 917 (1979)). "Shall" "`is to be treated as mandatory or permissive, depending upon the intent of the legislature as determined by the ordinary rules of construction.' " State v. Bryan, 93 Wash.2d 177, 183, 606 P.2d 1228 (1980) (quoting State Liquor Control Bd. v. State Personnel Bd., 88 Wash.2d 368, 377, 561 P.2d 195 (1977)).
Nothing in RCW 10.99.040 "indicates a legislative intent contrary to `shall' being mandatory." Krall, 125 Wash.2d at 148, 881 P.2d 1040. Moreover, RCW 10.99.040 uses both "may" and "shall." Such use "indicates that the Legislature intended the two words to have different meanings: `may' being directory while `shall' being mandatory." State v. Bartholomew, 104 Wash.2d 844, 848, 710 P.2d 196 (1985); see also Krall, 125 Wash.2d at 148-49, 881 P.2d 1040 (quoting Bartholomew with approval).
Additionally, absent the existence of ambiguity, this court ascertains the meaning of a statute from its language alone. State v. Azpitarte, 140 Wash.2d 138, 995 P.2d 31, 33 (2000) (citing Washington State Coalition for the Homeless v. Department of Social & Health Serv., 133 Wash.2d 894, 904, 949 P.2d 1291 (1997)). No provision of a statute "should be deemed inoperative unless the result of obvious mistake." Azpitarte, 995 P.2d at 33 (citing Cox v. Helenius, 103 Wash.2d 383, 387-88, 693 P.2d 683 (1985)). Here, "[t]here is no obvious mistake." Azpitarte, 995 P.2d at 33. Thus, we must conclude that the statute means what it says; the no-contact order "shall" bear a consent warning. The policy underlying the statute supports this reading. The consent warning serves an important function in deterring individuals from violating the order. Absent the warning, one might mistakenly believe that consent to contact by the person protected under the order invalidates the order's otherwise mandatory prohibition. Consequently, the mandatory language is consistent with the legislative intent to increase protection for victims of domestic violence and punish persons who violate such orders by eliminating the consent defense. RCW 10.99.010.
In summary, we conclude that the no-contact order was invalid for the purpose of convicting Marking of violating it. Because a valid no-contact order was an element of the offense, the evidence was insufficient to support the conviction. See State v. Hickman, 135 Wash.2d 97, 105-06, 954 P.2d 900 (1998); State v. Joy, 121 Wash.2d 333, 342-43, 851 P.2d 654 (1993); Edwards, 87 Wash.App. at 311, 941 P.2d 697.
As we reverse on the basis of the invalid no-contact order, we need not consider Marking's argument that the trial court erred in not allowing the officer's testimony.
Accordingly, we reverse.
ARMSTRONG, C.J., and HUNT, J., concur.
NOTES
[1]  RCW 10.99.040(4)(a) states in pertinent part:

Willful violation of a court order issued under subsection (2) or (3) of this section is a gross misdemeanor except as provided in (b) and (c) of this subsection (4).
RCW 10.99.040(4)(b) states in pertinent part:
Any assault that is a violation of an order issued under this section and that does not amount to assault in the first or second degree under RCW 9A.36.011 or 9A.36.021 is a class C felony punishable under chapter 9A.20 RCW.
[2]  We note that the information charged Marking with violation of RCW 10.99.050, the form of order issued "after a determination of guilt and when a court determines that contact with the victim should be restricted as a sentencing condition." Anaya, 95 Wash.App. at 754, 976 P.2d 1251. An RCW 10.99.050(2) post-conviction order requires a more limited warning: "Violation of this order is a criminal offense under chapter 10.99 RCW and will subject a violator to arrest; any assault, drive-by shooting, or reckless endangerment that is a violation of this order is a felony." But at Marking's trial, the court's elements instructions referenced the pretrial order set forth in RCW 10.99.045.
