Trainor, who celebrated her 24th birthday Friday, announced the news on social media the same day -- just one day after the "Spy Kids" actor dropped down on one knee.
The emotional moment was all caught on video.
Trainor added, “Thank you Daryl, my family and friends for making me feel like a real princess and thank you @ryan.trainor for this amazing video that I’m gonna watch over and over again."
Sabara, 25, also shared the special moment on Instagram, using the caption to send another sweet message to his new fiancée.
"Happy birthday to my soulmate," he wrote. "Thank you for changing my life forever and thank you for saying yes! You are the most beautiful fiancé in the world. I love you @meghan_trainor."
The two, who were introduced by mutual friend Chloë Grace Moret, went public with their relationship in October 2016.
A proposal may have not come as a surprise to Trainor, who told Cosmopolitan magazine back in April that she had written a song called, "Marry Me," inspired by Sabara.
"I never really felt sexy with guys before," the singer continued. "No one expressed how they liked my body out loud in the bedroom until I met Daryl. He is obsessed with it -- every inch. And that has improved my confidence more than even [my song 'All About That Bass'] did. He’s a champion, so we’re in heaven.”