扩展Struts验证框架实现标准化数据的验证  被引量:2

Extends the validator to validates standard data type

在线阅读下载全文

作  者:张言辉[1] 姜利群[1] 朱晴[1] 

机构地区:[1]中国矿业大学计算机科学与技术学院,江苏徐州221000

出  处:《微计算机信息》2010年第27期126-127,149,共3页Control & Automation

基  金:基金申请人:姜利群;项目名称:程序的异常传播分析技术研究;基金颁发部门:教育部科学技术研究重点项目(108063)

摘  要:无论是自动产生还是用户输入的数据,都要验证它的完整性和有效性。这项工作可能非常繁琐,因为数据可能有不同的类型和格式。随着MVC设计模式的流行,Struts框架的应用越来越广泛,在程序设计过程中Struts的验证框架也就必然因其安全、可配置变得广泛起来。Struts的Validator验证框架定义了十几种常用的验证规则,如required(验证非空)、minlength(验证最小长度)、maxlength(验证最大长度)、intRange(验证数据范围)、email(验证电子邮件地址)、date(验证日期)等。这对于提高验证效率和数据验证安全性提供了很好的实现,但这并不能实现一些较普遍而且标准的数据验证需求。本文章主要是通过扩展Struts验证框架实现对专业标准化数据的验证。System must verify the integrity and effectiveness of the data either automatically generated or user inputed. This work will be complicated, since system data may have different types and formats. With the popularity of MVC design pattern, struts framework are usded widely with its validation framework because of the safety and configable. Struts validator framework defines a dozen commonly used validation rules such as required (verify non-empty), minlength (verify minimum length), maxlength (verify maximum length), intRange (verify data range), email (e-mail verification ), date (verify date). This will improve the verification efficiency and security, but can not achieve some more common and standard data validation requirements. This article is focus on how to verify standard data type by extending the struts validation framework.

关 键 词:数据验证 行业标准类型数据 验证规则 

分 类 号:TP311[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象