根据给定的输入，编写一篇全文编辑，将其语法和拼写错误更正。
一篇包含拼写和语法错误的文章。
以下是一篇包含拼写和语法错误的文章：

"i wuz goin two go to tha stor to by sumthing four mi frend. But wen i arived i reelize that i 4got mi purce at hom. It wuz so emberassin becuz mi frend wuz withe me. I hat it wen that hapens. Luckuly mi frend payd fo tha thing i wantid to by. Neext tiem i wil makee shure to chack mi bag befur i leev."

以下是更正后的文章：

"I was going to go to the store to buy something for my friend. But when I arrived, I realized that I forgot my purse at home. It was so embarrassing because my friend was with me. I hate it when that happens. Luckily, my friend paid for the thing I wanted to buy. Next time, I will make sure to check my bag before I leave."