Field 표현식 Validator

OGNL 표현식으로 검사를 하는 Field Validator.

파라메터

fieldName - 일반 Validator 태그를 사용하는 경우 필수.
expression - 표현식(평가 결과가 Boolean값이어야 함)

예제

<!-- Plain Validator Syntax -->
<validators>
    <!-- Plain Validator Syntax -->
    <validator type="fieldexpression">
       <param name="fieldName">myField</param>
       <param name="expression"><![CDATA[#myCreditLimit > #myGirfriendCreditLimit]]></param>
       <message>My credit limit should be MORE than my girlfriend</message>
    <validator>
    
    <!-- Field Validator Syntax -->
    <field name="myField">
        <field-validator type="fieldexpression">
            <param name="expression"><![CDATA[#myCreditLimit > #myGirfriendCreditLimit]]></param>
            <message>My credit limit should be MORE than my girlfriend</message>
        </field-validator>
    </field>
    
</vaidators>
Comments