She is based on Badroulbadour from the original Aladdin stories.
Possibly the first princess to have less screen time compared to the prince. Jasmine is about to turn 16 years old but at that age she needs to get married to a royal prince due to the law. She refuses to marry any of the men her father Sultan suggests as she only wants to get married for love instead of just for the law. Jasmine who has never been outside of the castle decides to sneak out one night in disguise where she meets Aladdin whom she can relate to. Aladdin gets arrested for helping out Jasmine as she gave a boy an apple without paying for it. Jasmine takes off her disguise revealing herself to be the princess of Agrabah and commands Razoul not to arrest Aladdin. Unfortunately Razoul still has to since he's under Jafar's orders.
Jasmine confronts Jafar to let Aladdin go however, Jafar lies to her claiming Aladdin has already been executed when that's not true. She blames herself for this mess and realizes she never got to learn Aladdin's name. Jafar is set to marry Jasmine though she explains how even after marriage she can still punch Jafar as queen for his punishment. Aladdin grants that Genie makes Aladdin a royal prince so he's able to marry Jasmine. He visits Jasmine in her castle under the alias Prince Ali Ababwa. Jasmine mistakes him to be another guy her father suggested to marry though Aladdin convinces Jasmine to take a ride on his magic carpet. During the ride still unsure who he really is Jasmine falls in love with Prince Ali Ababwa. Though she catches on as Aladdin and Ali share similarities being furious she tells Aladdin off but the two calm down and share a kiss at the castle.
She tells Sultan she decides to marry Aladdin however she's unable to as Jafar plans on marrying her. Aladdin realizes Sultan is under a spell to obey Jafar he goes after him at the desert where the lamp is. Jasmine finally learns Aladdin's name and helps him out defeating Jafar who transforms into a snake. At the end Sultan changes the law allowing Aladdin and Jasmine to get married. The end.