How does tp3.2 validate when adding data in batches with addAll?

use addAll to add multiple identical pieces of data in batches; that is to say, what is passed in from the front end is actually an one-dimensional array;
how to do verification? For example: I want to verify fields such as typeId,price, num, count

can you protected $_ validate = [.] in the model, and then manually call $_ validate in the controller (how to manually?)

or can only validate directly in the controller?
if (typeId = = integer) {}
if (num = = integer) {}
.

do I make it clear when I describe it this way?

Mar.28,2021

solved it on its own.

Menu