Extends the validator to validates standard data type
Zhu Qing · Microcomputer Information · 2010
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.