0

I'm using an InputFilter to validate my data but no Zend\Form.

    $entities = new Input('entities');
    $entities->setRequired(false);
    return $entities;

Entities is a collection of Entity.

I don't know how to check that entities is a valid array and then that each value of entities is a valid entity.

1 Answer 1

2

If your Entity is one dimension array, use ArrayInput. if it is a multi-dimension array, which means a collection of array, use CollectionInputFilter.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.