Log in
Model

ValidateGender

Magento\CustomerGraphQl\Model\Customer\ValidateCustomerData\ValidateGender

What it does

This validator class ensures that gender values submitted through GraphQL customer mutations are valid according to the customer attribute options defined in Magento.

It checks if the provided gender value matches one of the allowed options configured in the system, throwing an exception if an invalid value is provided.

Developers would use this as part of the customer data validation pipeline when creating or updating customers via GraphQL.

Public Methods

  • execute()