structs 2 vaidation 기반 date 형식 검증

1259 단어 xml
<?xml version="1.0" encoding="GBK"?>
<!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">

<validators>
<field name="kaishi">
   <field-validator type="date">
    <param name="min">2010-05-01</param>
    <param name="max">2040-01-01</param>
    <message>         !  :20${min} 20${max}</message>
   </field-validator>
   <field-validator type="fieldexpression">
    <param name="expression"><![CDATA[(kaishi<jieshu)]]></param>
    <message>             !</message>
   </field-validator>
</field>
<field name="jieshu">
   <field-validator type="date">
    <param name="min">2010-05-01</param>
    <param name="max">2040-01-01</param>
    <message>         !  :20${min} 20${max}</message>
   </field-validator>
</field>
 

좋은 웹페이지 즐겨찾기