Form and rules
How it works
Use have to for rules or practical necessity: I have to wear an ID card.
Use must for strong personal obligation or strong rules, especially in notices and instructions.
Don't have to means there is no necessity; the action is optional.
Mustn't means prohibition: the action is not allowed.
Use had to for past necessity; must has no normal past form for obligation.