validator-rules.xml ( File view )

  • By 2010-09-02
  • View(s):14
  • Download(s):1
  • Point(s): 1
			<!DOCTYPE form-validation PUBLIC
          "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1.3//EN"
          "http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd">
<!--
  $Header: /home/cvs/jakarta-struts/conf/share/validator-rules.xml,v 1.52 2004/07/25 12:00:20 niallp Exp $
  $Revision: 1.52 $
  $Date: 2004/07/25 12:00:20 $

   This file contains the default Struts Validator pluggable validator
   definitions.  It should be placed somewhere under /WEB-INF and
   referenced in the struts-config.xml under the plug-in element
   for the ValidatorPlugIn.

      <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
        <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,
                                                  /WEB-INF/validation.xml"/>
      </plug-in>

   These are the default error messages associated with
   each validator defined in this file.  They should be
   added to your projects ApplicationResources.properties
   file or you can associate new ones by modifying the
   pluggable validators msg attributes in this file.

   # Struts Validator Error Messages
   errors.required={
0
} is required.
   errors.minlength={
0
} can not be less than {
1
} characters.
   errors.maxlength={
0
} can not be greater than {
1
} characters.
   errors.invalid={
0
} is invalid.

   errors.byte={
0
} must be a byte.
   errors.short={
0
} must be a short.
   errors.integer={
0
} must be an integer.
   errors.long={
0
} must be a long.
   errors.float={
0
} must be a float.
   errors.double={
0
} must be a double.

   errors.date={
0
} is not a date.
   errors.range={
0
} is not in the range {
1
} through {
2
}.
   errors.creditcard={
0
} is an invalid credit card number.
   errors.email={
0
} is an invalid e-mail address.

   Note: Starting in Struts 1.2.0 the default javascript definitions have
         been consolidated to commons-validator. The default can be overridden
         by supplying a <javascript> element with a CDATA section, just as
         in struts 1.1.

-->

<form-validation>

   <global>

      <validator name="required"
            classname="org.apache.struts.validator.FieldChecks"
               method="validateRequired"
         methodParams="java.lang.Object,
                       org.apache.commons.validator.ValidatorAction,
                       org.apache.commons.validator.Field,
                       org.apache.struts.action.ActionMessages,
                       javax.servlet.http.HttpServletRequest"
                  msg="errors.required"/>

      <validator name="requiredif"
                 classname="org.apache.struts.validator.FieldChecks"
                 method="validateRequiredIf"
                 methodParams="java.lang.Object,
                               org.apache.commons.validator.ValidatorAction,
                               org.apache.commons.validator.Field,
                               org.apache.struts.action.ActionMessages,
                               org.apache.commons.validator.Validator,
                               javax.servlet.http.HttpServletRequest"
                 msg="errors.required"/>

      <validator name="validwhen"
          msg="errors.validwhen"
                 classname="org.apache.struts.validator.validwhen.ValidWhen"
                 method="validateValidWhen"
                 methodParams="java.lang.Object,
                       org.apache.commons.validator.ValidatorAction,
                       org.apache.commons.validator.Field,
                       org.apache.struts.action.ActionMessages,
                       org.apache.commons.validator.Validator,
                       javax.servlet.http.HttpServletRequest"/>


      <validator name="minlength"
            classname="org.apache.struts.validator.FieldChecks"
               method="validateMinLength"
         methodParams="java.lang.Object,
                       org.apache.commons.validator.ValidatorAction,
                       org.apache.commons.validator.Field,
                       org.apache.struts.action.ActionMessages,
                       javax.servlet.http.HttpServletRequest"
              depends=""
                  msg="errors.minlength"
           jsFunction="org.apache.commons.validator.javascript.validateMinLength"/>


      <validator name="maxlength"
            classname="org.apache.struts.validator.FieldChecks"
               method="validateMaxLength"
         methodParams="java.lang.Object,
                       org.apache.commons.validator.ValidatorAction,
                       org.apache.commons.validator.Field,
                       org.apache.struts.action.ActionMessages,
                       javax.servlet.http.HttpServletRequest"
              depends=""
                  msg="errors.maxlength"
           jsFunction="org.apache.commons.validator.javascript.validateMaxLength"/>



      <validator name="mask"
            classname="org.apache.struts.validator.FieldChecks"
               method="validateMask"
         methodParams="java.lang.Object,
                       org.apache.commons.validator.ValidatorAction,
                       org.apache.commons.validator.Field,
                       org.apache.struts.action.ActionMessages,
                       javax.servlet.http.HttpServletRequest"
              depends=""
                  msg="errors.invalid"/>


      <validator name="byte"
            classname="org.apache.struts.validator.FieldChecks"
               method="validateByte"
         methodParams="java.lang.Object,
                       org.apache.commons.validator.ValidatorAction,
                       org.apache.commons.validator.Field,
                       org.apache.struts.action.ActionMessages,
                       javax.servlet.http.HttpServletRequest"
              depends=""
                  msg="errors.byte"
       jsFunctionName="ByteValidations"/>


      <validator name="short"
            classname="org.apache.struts.validator.FieldChecks"
               method="validateShort"
         methodParams="java.lang.Object,
                       org.apache.commons.validator.ValidatorAction,
                       org.apache.commons.validator.Field,
                       org.apache.struts.action.ActionMessages,
                       javax.servlet.http.HttpServletRequest"
              depends=""
                  msg="errors.short"
       jsFunctionName="ShortValidations"/>


      <validator name="integer"
            classname="org.apache.struts.validator.FieldChecks"
               method="validateInteger"
         methodParams="java.lang.Object,
                       org.apache.commons.validator.ValidatorAction,
                       org.apache.commons.validator.Field,
                       org.apache.struts.action.ActionMessages,
                       javax.servlet.http.HttpServletRequest"
              depends=""
                  msg="errors.integer"
       jsFunctionName="IntegerValidations"/>



      <validator name="long"
            classname="org.apache.struts.validator.FieldChecks"
               method="validateLong"
         methodParams="java.lang.Object,
                       org.apache.commons.validator.ValidatorAction,
                       org.apache.commons.validator.Field,
                       org.apache.struts.action.ActionMessages,
                       javax.servlet.http.HttpServletRequest"
              depends=""
                  msg="errors.long"/>


      <validator name="float"
            classname="org.apache.struts.validator.FieldChecks"
               method="validateFloat"
         methodParams="java.lang.Object,
                       org.apache.commons.validator.ValidatorAction,
                       org.apache.commons.validator.Field,
                       org.apache.struts.action.ActionMessages,
                       javax.servlet.http.HttpServletRequest"
              depends=""
                  msg="errors.float"
       jsFunctionName="Floa
...
...
(Please download the complete source code to view)
			
...
Expand> <Close

Want complete source code? Download it here

Point(s): 1

Download
0 lines left, continue to read
Sponsored links

File list

Tips: You can preview the content of files by clicking file names^_^
Name Size Date
bookMain.jsp4.13 kB15-04-06|12:00
bookShopCart.jsp6.35 kB15-04-06|12:04
bookShow.jsp3.27 kB15-04-06|12:03
jsp网上书店系统(毕业论文).doc314.50 kB16-05-08|12:22
orderAddress.jsp6.43 kB15-04-06|12:03
orderConfirm.jsp7.17 kB05-07-05|14:33
orderHistory.jsp4.44 kB15-04-06|12:03
userLogin.jsp2.89 kB08-03-09|10:49
userRegister.jsp5.15 kB21-04-09|08:31
wrong.jsp1.92 kB15-04-06|12:04
00-1.gif2.13 kB05-07-05|14:33
00-2.gif2.09 kB05-07-05|14:33
007.gif4.43 kB05-07-05|14:33
b10025.gif1.87 kB05-07-05|14:33
banner.gif19.33 kB05-07-05|14:33
book.gif84.00 B05-07-05|14:33
book00001.jpg3.70 kB05-07-05|14:33
book00002.jpg13.20 kB05-07-05|14:33
book800_005.gif2.20 kB05-07-05|14:33
book800_081.gif192.00 B05-07-05|14:33
book800_19_08.gif985.00 B05-07-05|14:33
bookTop.gif10.37 kB05-07-05|14:33
book_001.gif3.92 kB05-07-05|14:33
book_002.gif1.74 kB05-07-05|14:33
book_003.gif2.15 kB05-07-05|14:33
book_004.gif73.00 B05-07-05|14:33
book_005.gif721.00 B05-07-05|14:33
book_006.gif766.00 B05-07-05|14:33
book_007.gif726.00 B05-07-05|14:33
book_008.gif730.00 B05-07-05|14:33
book_011.gif1.91 kB05-07-05|14:33
book_012.gif689.00 B05-07-05|14:33
book_013.gif705.00 B05-07-05|14:33
book_020.gif2.31 kB05-07-05|14:33
book_026.gif565.00 B05-07-05|14:33
book_027.gif1.59 kB05-07-05|14:33
book_028.gif666.00 B05-07-05|14:33
book_029.gif2.33 kB05-07-05|14:33
book_032.gif690.00 B05-07-05|14:33
book_035.gif2.18 kB05-07-05|14:33
book_038.gif688.00 B05-07-05|14:33
book_039.gif1.99 kB05-07-05|14:33
book_040.gif1.46 kB05-07-05|14:33
book_041.gif63.00 B05-07-05|14:33
book_042.gif2.15 kB05-07-05|14:33
book_043.gif790.00 B05-07-05|14:33
book_046.gif4.62 kB05-07-05|14:33
book_bg2.gif197.00 B05-07-05|14:33
book_logo.gif1.31 kB05-07-05|14:33
button002.gif550.00 B05-07-05|14:33
button005.gif547.00 B05-07-05|14:33
kong.gif43.00 B05-07-05|14:33
new.css4.55 kB05-07-05|14:33
order.gif180.00 B05-07-05|14:33
pwd.gif311.00 B05-07-05|14:33
ruanjian.jpg133.71 kB05-07-05|14:33
spacer.gif43.00 B05-07-05|14:33
stars4.gif233.00 B05-07-05|14:33
style.css2.36 kB05-07-05|14:33
Thumbs.db101.00 kB16-05-08|13:19
ti1.gif774.00 B05-07-05|14:33
ti2.gif772.00 B05-07-05|14:33
view.gif386.00 B05-07-05|14:33
struts-bean.tld8.65 kB05-07-05|14:33
struts-config.xml5.19 kB05-07-05|14:33
struts-html.tld65.98 kB05-07-05|14:33
validation.xml2.12 kB05-07-05|14:33
validator-rules.xml11.97 kB05-07-05|14:33
web.xml696.00 B21-04-09|08:15
AddrConfirmAction.java2.89 kB05-07-05|14:33
Book.java4.52 kB05-07-05|14:33
BookBuyAction.java2.56 kB05-07-05|14:33
BookCat.java1.11 kB05-07-05|14:33
BookDetailAction.java1.47 kB05-07-05|14:33
BookSearchAction.java2.64 kB05-07-05|14:33
ClearShopCartAction.java1.24 kB05-07-05|14:33
Constants.java1.02 kB05-07-05|14:33
DB.java1.32 kB05-07-05|14:33
DetailAction.java1.50 kB05-07-05|14:33
FirstAction.java2.53 kB05-07-05|14:33
LoginAction.java1.95 kB05-07-05|14:33
MyRequestProcessor.java693.00 B05-07-05|14:33
MyResource_zh.properties955.00 B05-07-05|14:33
Order.java2.63 kB05-07-05|14:33
OrderDelAction.java1.97 kB05-07-05|14:33
OrderHistoryAction.java1.44 kB05-07-05|14:33
PageCtrlAction.java2.29 kB05-07-05|14:33
RegistAction.java2.16 kB05-07-05|14:33
SearchStatus.java1.22 kB05-07-05|14:33
ShopCart.java647.00 B05-07-05|14:33
ShopCartForm.java4.32 kB05-07-05|14:33
UpdateShopCartAction.java1.94 kB05-07-05|14:33
User.java2.20 kB05-07-05|14:33
AddrConfirmAction.class2.79 kB05-07-05|14:33
Book.class3.84 kB05-07-05|14:33
BookBuyAction.class2.64 kB05-07-05|14:33
BookCat.class1.32 kB05-07-05|14:33
BookDetailAction.class1.60 kB05-07-05|14:33
BookSearchAction.class2.49 kB05-07-05|14:33
ClearShopCartAction.class1.06 kB05-07-05|14:33
Constants.class995.00 B05-07-05|14:33
DB.class1.59 kB05-07-05|14:33
DetailAction.class1.63 kB05-07-05|14:33
LoginAction.class2.48 kB05-07-05|14:33
MyRequestProcessor.class708.00 B05-07-05|14:33
Order.class2.75 kB05-07-05|14:33
OrderDelAction.class2.24 kB05-07-05|14:33
OrderHistoryAction.class1.55 kB05-07-05|14:33
PageCtrlAction.class2.50 kB05-07-05|14:33
RegistAction.class2.14 kB05-07-05|14:33
SearchStatus.class1.32 kB05-07-05|14:33
ShopCart.class951.00 B05-07-05|14:33
UpdateShopCartAction.class1.61 kB05-07-05|14:33
User.class2.29 kB05-07-05|14:33
antlr.jar379.46 kB05-07-05|14:33
commons-beanutils.jar115.94 kB05-07-05|14:33
commons-collections.jar171.31 kB05-07-05|14:33
commons-digester.jar106.54 kB05-07-05|14:33
commons-fileupload.jar21.85 kB05-07-05|14:33
commons-logging.jar37.12 kB05-07-05|14:33
commons-validator.jar82.29 kB05-07-05|14:33
jakarta-oro.jar63.73 kB05-07-05|14:33
struts.jar514.24 kB05-07-05|14:33
BookStore0.00 B24-03-09|12:40
classes0.00 B24-03-09|12:40
lib0.00 B24-03-09|12:40
images0.00 B24-03-09|12:40
WEB-INF0.00 B24-03-09|12:40
bookstore0.00 B24-03-09|12:40
...
Sponsored links

validator-rules.xml (1.76 MB)

Need 1 point
Your Point(s)

Your Point isn't enough.

Get point immediately by PayPal

More(Debit card / Credit card / PayPal Credit / Online Banking)

Submit your source codes. Get more point

LOGIN

Don't have an account? Register now
Need any help?
Mail to: support@codeforge.com

切换到中文版?

CodeForge Chinese Version
CodeForge English Version

Where are you going?

^_^"Oops ...

Sorry!This guy is mysterious, its blog hasn't been opened, try another, please!
OK

Warm tip!

CodeForge to FavoriteFavorite by Ctrl+D