Hi,

Simple theme doesn't support Validation and error reporting. you may have to use some other theme like xhtml theme

http://struts.apache.org/2.x/docs/xhtml-theme.html

Thanks,

Nuwan

Rodrigo Pereira wrote:
Hi,
how can I position validation message on the screen? Also, when I have
a simple theme form I am getting JS error alert message "[object
Error]", does anybody know how to fix that?

form:

<s:form id="testForm" action="save" method="post" validate="true">
        <table>                   
                <tr>
                        <td align="right"><s:text name="label.email"/><span
class="required">*</span>:</td>
                        <td><s:textfield name="user.email" value="%{user.email}" 
size="30"
theme="simple"/></td>
                </tr>
        </table>
</s:form>

validation.xml:

<validators>

  <field name="user.email">     

        <field-validator type="required">
                <message key="errors.email.required"/>
          </field-validator>

        <field-validator type="email">
                <message key="errors.email.notValid" />
        </field-validator>

  </field>

</validators>

Thanks,
Rodrigo Pereira

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to