WebWork2 Validators Extension ReadMe

 

1.download and unzip

2.find jscud_wwvalidators_1_??.jar,modify classpath or copy the file to your WEB-INF\lib

3.copy checkform.js to your project ,then use it

  how to use?

  I: link checkform.js in your file (should change your path)

  <script language="javascript" src="checkform.js"></script>

   

  II: modify or override  form-close.vm,include or refer checkform.js.please read webwork document for template.

   for example add line: #parse("/template/XXX/checkform.js")  

  or

<script language="javascript" src="$req.contextPath/js/checkform.js"></script>
#parse("/template/simple/form.vm")
<table class="wwFormTable">

 

 

4.modify your validators.xml 

  notice:for String Storage Length Validators,for one of your project,only can use one of them at same time,modify it by your storage setting. certainly,your can modify it in runtime by actually conditions.

  please check directory "test",find validators.xml

5.modify XXXAction-validation.xml or XXXAction-Alias-validation.xml

  please check directory "test",find TestAction-doAdd-validation.xml