M
M
My joy2018-02-06 17:15:45
Yii
My joy, 2018-02-06 17:15:45

How to validate an array from a form?

Hi friends!
The form has fields:

<input name="bid[1]">
<input name="bid[2]">
<input name="bid[3]">

Tell me how to correctly describe in validators that all array values ​​must be integer ? After all, this is not just one field, so that you can simply check it, ['bid', 'integer']but an array. And it must have both keys and values ​​integer.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Fedorov, 2018-02-06
@t-alexashka

each-validator will handle this

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question