$definition ->
add('salutationId',
new EntityExists(['entity' =>
$this->salutationDefinition->
getEntityName(), 'context' =>
$frameworkContext])) ->
add('firstName',
new NotBlank()) ->
add('lastName',
new NotBlank()) ->
add('accountType',
new Choice($this->accountTypes
));
if ($this->systemConfigService->
get('core.loginRegistration.showBirthdayField',
$salesChannelId) &&
$this->systemConfigService->
get('core.loginRegistration.birthdayFieldRequired',
$salesChannelId)) { $definition ->
add('birthdayDay',
new GreaterThanOrEqual(['value' => 1
]),
new LessThanOrEqual(['value' => 31
])) ->
add('birthdayMonth',
new GreaterThanOrEqual(['value' => 1
]),
new LessThanOrEqual(['value' => 12
])) ->
add('birthdayYear',
new GreaterThanOrEqual(['value' => 1900
]),
new LessThanOrEqual(['value' =>
date('Y'
)]));
} }}