可以的,
你可以在validator-rules.xml定义自己的validator,这个validator就可以用js来实现验证
然后在validation.xml里面直接使用它就行了

解决方案 »

  1.   

    我觉得应该不可以。
    这是Struts库自动生成的。
      

  2.   

    都是大猩猩!.................................蛙4!!!!!!!!!!!!!!!!!!!!!!!!!!!学习ing
      

  3.   

    http://www.cjsdn.net/post/view?bid=20&id=138654&sty=1i never use struts validator...
    u may need to implement ur validation-rules.xml and ur validator plugin..
    or u can try to remove some un-used nodes from validation-rules.xml yes, I am having the same issue, just don't have time to think about this.I am still believing, there is no such thing, like a javascript framework. The reason is just what you said, the overhead in size is too big. Once someone gave me this js framework, it was about 110K in size. Does anyone want to download a 5K page with 110K javascript embedded?Nontheless, it seems a lot of people buying in this validator lib, for its simplicity to use, do some setup and then it's there. In this case, we shouldn't manually to change it at all, let the tool do the dirty job. So my advice is "Forget it, it's not worth it" - quote from the snowman, threatened by the rabbit with a hairdryer.
      

  4.   

    Up exerted all my strength.
      

  5.   

    你可以在validator-rules.xml定义自己的validator,这个validator就可以用js来实现验证
    然后在validation.xml里面直接使用它就行了
    ----
    上面说了,就是这样做
      

  6.   

    还是自己写JS方便,爱干啥就干啥,省得去配置之类的,也许每个人的做法不一样,但是独立出来的JS可以达到最大程序上面的重用:)
      

  7.   

    我怕hack把JS漏过去,现在都在server上面做了