This can be a tricky situation for GMs to handle. Firstly, I need to point out that (bolded for effect) Welcoming new players is the task of both the GM and the more experienced players.
I'm actually running a Pathfinder game right now, and we do have 1 player new to Roleplaying, though the rest of the group is pretty experienced.
Now that we've gotten that out of the way, I definitely think that the GM should be granting leeway for several sessions, especially for those that are totally new to Roleplaying. If they make a mistake which is going to be painful (forgetting to shift so as to not provoke attacks), I think that they should be allowed to take their action back and just shift. Try to do it in character if possible ("Mage! Be careful, your casting that close to an enemy leaves you open to attack!").
This concept can expand to further information in game outside of combat: "Excuse me, my Paladin friend! Aren't you an experienced historian? What can you tell us about this ancient fortress?" At which point the GM can step in, have the player roll, and tell them what they know.
I agree with Akhier that this should only take a few sessions for the basics, but things like how the heck poisons work can take even experienced players awhile to get the hang of, so there will always be some kind of leeway at the table. (What do you mean an Alchemist's bombs don't hit diagonals? OR do they? thumbs through book).
That said, after a couple of sessions, if the poor Wizard is still forgetting to shift back, or to cast defensively, making them eat an opportunity attack and lose the spell might be the only way for them to learn it's a bad idea.
Ultimately, it is the job of everyone at the table to make the new players feel welcome, and everyone needs to be on board with helping out if it is really going to work.