The sentence "You don't have to go" is usually translated as
Tu n'es pas obligé(e) d'y aller.
and not
Tu ne dois pas y aller.
because the latter will be understood as "You mustn't go", which is very different.
What about
A: I still have a page to write. I won't be able to finish it in time.
B: Just write what you can. It doesn't have to be perfect.
How can we translate "doesn't have to" here?
A: J'ai encore une page à écrire. Je ne pourrai pas la finir à temps.
B: Écris simplement ce que tu peux. _____ être parfait.
Is it "Ce n'est pas obligé d'être parfait"?