I have a Struts 2 app, the validation works just fine, it validates the necessary fields and throws the adequate error message. The problem comes in a very specific location i.e. character number 5838 !
In my validation.xml file I have numerous fields defined, one of them is
<field name="idState">
<field-validator type="requiredstring">
<param name="expression"><![CDATA[
idNumber == null || idNumber.trim().length() == 0
|| (idState != null && idState.trim().length() > 0)
]]></param>
<message>Please enter your State.</message>
</field-validator>
</field>
(Please pardon my code formatting !) Technically I should get the error message as "Please enter your State." to my amusement I am only getting "Please enter yo". And this happens at the location 5838 (ie. the error message truncates).
Now if I add a space in the tag as I get "Please enter y". I noticed that this only happens at the location 5838. All the messages after and before this are displayed correctly.
Any clue as to what's happening ?