array_walk_recursive($data,
function D&
$item,
$key) use ($whitelist) { if (\
in_array($key,
$whitelist, true
)) { return $item;
} $item =
strip_tags($item);
});
$event->
setData($data);
});
$builder->
add('email', EmailType::
class,
[ 'constraints' =>
[ new FormEmail(['shop' =>
$this->context->
getShopContext()->
getShop()]),
],
]);
$builder->
add('password', PasswordType::
class,
[ 'constraints' =>
[new Password()],
]);
if ($this->config->
get('doublepasswordvalidation'
)) { $builder->
add('passwordConfirmation', PasswordType::
class,
[ 'mapped' => false,
]);
}