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.
如何为 type=>number 的输入表单字段设置最小值。我有一个计数字段,应该将 MINIMUM 值设置为 0。
在您的选项数组上,设置 "min" => "0"
您是否尝试过指定最小值和最大值,如规范中所述?
echo $this->Form->input('name', array( 'type' => 'number', 'min' => 5 ));