[英]Global Validation Sonata Admin Bundle
I am using Sonata admin bundle for one of my sites. 我正在为我的一个站点使用Sonata管理员捆绑包。 I have set up few admin services and everything is going on fine.
我已经设置了一些管理服务,并且一切正常。 Now am stuck with the validation.
现在卡住了验证。 I want the inputs fields to not accept scripts or invalid data.
我希望输入字段不接受脚本或无效数据。 And I want this for all the fields.
我想要所有领域。 Is there a way to implement validation on a global basis..??
有没有一种方法可以在全球范围内实施验证? ie for all the form fields?
即对于所有表单字段? Any help is greatly appreciated.
任何帮助是极大的赞赏。 Thanks.
谢谢。
you should try to use a custom validator service .... 您应该尝试使用自定义验证程序服务...。
Sonata documentation provides a example of how implement this : Sonata文档提供了如何实现此示例:
http://sonata-project.org/bundles/admin/master/doc/reference/conditional_validation.html http://sonata-project.org/bundles/admin/master/doc/reference/conditional_validation.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.