-
2 votesanswersviews
如何将验证器方法传递给复合组件
我创建了自己的inputText复合组件,它包装了Primefaces 3.4.5中的p:inputText . 它运行良好,但我无法弄清楚如何将bean验证器方法传递给p:inputText中的validator属性 . 我已经读过在复合组件中使用f:validator标签,但我真的需要在p:inputText上使用validator属性 . 如果我从我的xhtml中删除复合组件并使用常规的p:... -
2 votesanswersviews
Symfony2 - 自定义验证器和依赖注入
我试图使用依赖注入自定义验证器,以便能够使用entityManager . 我按照Symfony示例:Dependency Injection,但我总是收到此错误消息: FatalErrorException:错误:在/home/milos/workspace/merrin3/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Va... -
0 votesanswersviews
使用CustomValidator更改文本框的颜色
我正在运行时创建一些文本框,如果文本框留空并且用户提交表单,我想更改文本框的颜色 . 我正在使用代码隐藏方法,这是我在.aspx.cs文件中编写的代码 textBoxObj是我在运行时创建的文本框对象,它是我想要空验证的对象 . CustomValidator customValidatorObj = new CustomValidator(); customValidatorObj.Contro... -
0 votesanswersviews
自定义验证器不会调用@service_container
Symfony版本:2.5 Error “可捕获的致命错误:传递给Intermedius \ UserBundle \ Validator \ Constraints \ RegisteredEmailValidator :: __ construct()的参数1必须实现接口Symfony \ Component \ DependencyInjection \ ContainerInterfac...