Does anyone have a possible solution for using wild cards in error messages
for form validation?

In my package.properties I have:
arc.screen.required.error.message =  {0} is a required field

How does my validation need to be formatted to accept a parameter for the
message?
<!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="screenone.screenOneProtocolNumber">
        <field-validator type="requiredstring">
            <message key="arc.screen.required.error.message"/>
        </field-validator>
    </field>

    <field name="screenone.screenOnePrincipalInvestigator">
        <field-validator type="requiredstring">
           <message key="arc.screen.required.error.message"/>
        </field-validator>
    </field>
</validators

The form field looks like this:
<s:textfield name="screenone.screenOneProtocolNumber" id="
screenone.screenOneProtocolNumber" label="%{getText('
arc.screen.one.section.one.first.input.label')}" size="10" value="%{
screenone.screenOneProtocolNumber}"/>

I can't use  ${getText(fieldName)} is a required field because the message
that is displayed is:
screenone.screenOneProtocolNumber is required

Thanks,
Cory

Reply via email to