I validate the field, which I am allowed to be empty string, but I have a rule there so that the field is only numeric. If I don’t fill in the field, he asks for it. Why, if I have set the field can be empty?
$validator
->scalar('phone')
->maxLength('phone', 50)
->allowEmptyString('phone')
->add('phone', [
'numeric' => [
'message'=> 'Must be numeric.',
]
]);
Thank you