At what age can a child spell their name?

AB

My son is 27 months and he can spell his name (Oliver) most of the time but sometimes he forgets the letter i .