<?php
namespace Okeonline\KejeDeliveryAddress\Storefront\Subscriber;
use Shopware\Core\Framework\Validation\BuildValidationEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class CustomerAddressCreateValidationEventSubscriber implements EventSubscriberInterface {
public static function getSubscribedEvents(): array
{
return [
'framework.validation.address.create' => 'beforeValidation'
];
}
public function beforeValidation(BuildValidationEvent $event)
{
$properties = $event->getDefinition()->getProperties();
unset($properties['salutationId']);
}
}