Think about a case where the same field can have multiple values. For example a multiple select or any dynamically added form elements.
In this case the given data is an array of expected data which will probably make all rules failed (except required).
Since this is a problem at field level checking it in Validator (whether Field->isMultiple() is true) could be the solution. If it is rules should be run on all the input data.
Think about a case where the same field can have multiple values. For example a multiple select or any dynamically added form elements.
In this case the given data is an array of expected data which will probably make all rules failed (except required).
Since this is a problem at field level checking it in
Validator
(whetherField->isMultiple()
istrue
) could be the solution. If it is rules should be run on all the input data.