You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Kevin Wade <kw...@mindspring.com> on 2009/02/24 00:31:46 UTC

[S2] Validation message truncated

I've just upgraded to 2.0.14 (from 2.0.11) in the hopes that it would  
solve a problem where validation messages are being truncated.  I have  
a <Class>-validation.xml with 26 fields, each field having at least  
one field-validator.  The validation works fine on all fields except  
there is always one field where the 'message' for the field-validator  
is being cut short.

For example, for the following field/field-validator:

     <field name="panelreview.recchangescurgoals">
        <field-validator type="conversion" short-circuit="true">
        		<param name="repopulateField">true</param>
        		<message>Current number of goals in permanency plan is not a  
valid number.</message>
        </field-validator>
     </field>

The message is being truncated to:
"Current number of goals in permanency plan is"

I have no idea why.  In fact if I move various fields around in the  
validation.xml file, then THOSE fields have their message truncated.   
It seems like the issue, oddly enough, is the location of the field/ 
field-validator in the validation file.  Or the number of fields.  So,  
for example, if I move a few fields around in the file and make this the

     <field name="panelreview.additionalinformation">
         <field-validator type="stringlength">
           	<param name="maxLength">1000</param>
        		<message>Additional information for court cannot be more  
than 1000 characters long.</message>
     	</field-validator>
     </field>

That's right.  If there is a validation error on that field, then the  
message gets truncated to:
"Additional information for court cannot be more than 1000 ch"

In both cases, the field is the 25th one (second-to-last) in the  
validation file.  Bizarre.  Any ideas?

Kevin