Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Once you have built the xwork.jar copy it into the webwork/lib/core folder, and delete the old one.

How do I use messages from within the validator?

...


<validators>
    <field name="name">
        <field-validator type="requiredstring">
            <message key="template.name.errors.required">A default message in case the key is not found</message>
        </field-validator>
    </field>
</validators> 

How do I set a global resource bundle?
How do I change the error message for invalid inputted fields?
You need to create a message for that field, for example if you have a user.dob field you would use this in your messages file (see above for example on setting a global messages file):
invalid.fieldvalue.user.dob=Please enter Date of Birth in the correct format.

...