In struts 1.1, text area doenot get validated(struts validator) beyond 1600 characters
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Aarthi_Srinivasachari
Posted On:   Monday, August 29, 2005 06:00 AM

I have a page which has many text boxes and a TEXT AREA -
since maxLength is not an attribute of Text area, i used struts validator(validator.xml) to validate the entry of 250 characters. The validation worked absolutely fine in WINDOWS environment, but in SOLARIS server, the validation failed if i entered more than 1600 characters. I wonder how it works good when i enter 1400 characters and fail when i enter 1600 characters.My customer requirement prevents me from using script validation.
when i tried to look into the log, it seems like the .do itself doesnot get fired.
Please suggest me a solution

Re: In struts 1.1, text area doenot get validated(struts validator) beyond 1600 characters

Posted By:   alan_do  
Posted On:   Monday, August 29, 2005 04:11 PM

how are you doing the validation? custom method added to the validator-rules.xml? what happens when 'validation fails' at 1600 chars? exception thrown? nothing works? 1600 chars allowed to be submitted?


you can also use script...NOT to do validation, but to prevent the user from enter more than 250 characters (onkeydown do a count of the number of characters and delete the last char enter if it's char #251). you can also add a message saying that anything above 250 chars will be truncated.

About | Sitemap | Contact