$builder->
add('country', IntegerType::
class,
[ 'constraints' =>
[new NotBlank(['message' => null
])],
]);
$builder->
add('state', IntegerType::
class);
$builder->
add('phone', TextType::
class,
[ 'constraints' =>
$this->
getPhoneConstraints(),
]);
$builder->
add('additionalAddressLine1', TextType::
class,
[ 'constraints' =>
$this->
getAdditionalAddressline1Constraints(),
]);
$builder->
add('additionalAddressLine2', TextType::
class,
[ 'constraints' =>
$this->
getAdditionalAddressline2Constraints(),
]);
// convert IDs to entities
$builder->
get('country'
)->
addModelTransformer(new EntityTransformer($this->models, Country::
class));
$builder->
get('state'
)->
addModelTransformer(new EntityTransformer($this->models, State::
class));
$builder->
add('attribute', AttributeFormType::
class,
[