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.
对于下图,我想显示一条错误消息,例如“Package name is alert exit”。
哪些验证规则适用于此?
您可以像这样在模型中使用验证:
$validate = array('name' => array( 'rule' => 'isUnique' 'message' => 'Package name is already exist.' ));
你可以在这里查看。