Are you wanting to check the item on the detail page before submission or are you wanting to check it in the Shopping Cart? If you want to check it on the page, you will need to access the Ecommerce API > Product Helper > IsOptionAllowed
Otherwise in the ShoppingCart, check out the ShoppingCartInfoProvider on the EcommerceProvider API