Can any one help me to override the customer registration api and restrict the @163.com emails while registering magento2 rest api
Help me great.
Thanks
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityYou can create a before plugin for function \Magento\Customer\Model\AccountManagement::createAccount
and get the email address from the $customer
object then do the domain validation if the validation fails throw some exception.
ref: https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html to create a plugin