您现在的位置是:首页 >

数据库在生活中的实例 Struts从零开始五、Struts中验证数据实例[6]

火烧 2021-07-31 07:40:36 1045
Strut 从零开始五、Strut 中验证数据实例[6]    添加验证规则  在WEB INF下创建validato xml这个文件 导入引用的dtd 添加如下内容    修改Re ource Bo

Struts从零开始五、Struts中验证数据实例[6]  

   添加验证规则

  在WEB INF下创建validaton xml这个文件 导入引用的dtd 添加如下内容

   修改Resource Boundle文件

  英文的资源文件 applicationResource_en_US properties

errors required={ } is required

  errors minlength={ } can not be less than { } characters

  errors maxlength={ } can not be greater than { } characters

  errors invalid={ } is invalid

  errors byte={ } must be a byte

  errors short={ } must be a short

  errors integer={ } must be an integer

  errors long={ } must be a long

  errors float={ } must be a float

  errors double={ } must be a double

  errors date={ } is not a date

  errors range={ } is not in the range { } through { }

  errors creditcard={ } is an invalid credit card number

  errors email={ } is an invalid e mail address

  button submit=Submit

  button reset=Reset

  button cancel=Cancel

  label username=UserName:

数据库在生活中的实例 Struts从零开始五、Struts中验证数据实例[6]

  label password=Password:

  loginform error username=please enter your username

  loginform error password=please enter your password

  loginform fail=invalidation name and password login error!

  中文的资源文件 applicationResource_zh_CN properties

  errors required={ } 是必须的

  errors minlength={ } 不能少于 { } 个字符

  errors maxlength={ } 不能多于 { } 个字符

  errors invalid={ } 是非法的

lishixinzhi/Article/program/Java/ky/201311/29086  
永远跟党走
  • 如果你觉得本站很棒,可以通过扫码支付打赏哦!

    • 微信收款码
    • 支付宝收款码