我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

表单类型类中的类约束验证器?

In the documentation it lists examples for applying a class validation constraint to Annotations, XML and YAML but not for PHP.

Since the validation is not applied to a property, where do I add this class validation constraint to the whole class inside a Symfony form type?

I think I've found a solution here: https://knpuniversity.com/screencast/question-answer-day/custom-validation-property-path There is a tip what says:

If your form lives in a form type class, simply add the constraints key to the setDefaulOptions method.

近期文章

  • 刷机失败了 求解决办法
  • OLEDB中是否有ADODB中Seek方法相同的功能?
  • Python:爬虫结果无数据
  • eclipse中SHA256加密结果不一致
  • 有趣的跳跃一维数组问题
  • gitee合并home分支和master分支时报错
  • ppt中随机线条动画效果
  • 关于#oracle#的问题,如何解决?
  • 数据无法从在线mysql服务器检索
  • 人脸识别自动启闭功能
  • 一道信息技术教师招聘考试,大致为下图所示,请解答
  • Python如何对xls文件的单元格取消合并?
  • 配置mysql失败了,这是怎么回事呢?
  • Java语言:作页上的不解,答神们帮我看看。
  • ue4 打包opencv到android
  • VBA读取工作表的小问题
  • 求()正点原子ov7725车牌识别停车计费程序
  • 如何使用Zend Framework 3添加cookie?
  • office坏了,怎么办,求解答,各位
  • 机械硬盘bios启动项识别不了

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华