2015-06-03 13:09
浏览 16

cakephp 3表单验证notEmpty

I set the title field to be required.

->requirePresence('title', 'create')

the problem is that the title input is not marked as required. I don't have this problem with another table.

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • drn34916 2015-06-03 13:19

    I found the answer after an hour. it was a little mistake.

    in controller action I wrote:


    while I should do this:


    sorry for wasting your time.

    点赞 打赏 评论

相关推荐 更多相似问题