Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有我的表单字段,我在 for 循环中附加了一个 id。
<?php echo $this->Form->input('Shipment.current_city'.$sh, array('label' => 'City')); ?>
我想知道如何验证这样的动态字段。目前,由于附加的 id,Cake 无法从我的模型中识别出我的验证规则。
谢谢。
您可以在此处找到问题的解决方案。
http://php-dev-zone.blogspot.com/2013/08/dynamic-fields-validation-in-cakephp.html