Casting While Threatened

Casting a spell takes a significant amount of concentration, forcing you to lower your defenses briefly. When you cast a spell, it gives targets threatening you in melee a chance to make an attack of opportunity against you (see Attack of Opportunity on page 248), unless the spell specifies otherwise—normally only the case for a few spells with a range of touch. If this attack of opportunity hits and damages you, you fail to cast the spell and lose the spell slot. For more information about threatened squares, see page 255.

Source

Core Rulebook pg. 246

This website uses trademarks and/or copyrights owned by Paizo Inc., which are used under Paizo's Community Use Policy. We are expressly prohibited from charging you to use or access this content. This website is not published, endorsed, or specifically approved by Paizo Inc. For more information about Paizo's Community Use Policy, please visit paizo.com/communityuse. For more information about Paizo Inc. and Paizo products, please visit paizo.com.