DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37962>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37962


[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From [EMAIL PROTECTED]  2006-01-09 08:05 -------
I have modified both the server side and client side validation so that 
the "line ending" length can be specified for the min and max length 
validators. The validators now "adjust" the value's length if a line ending 
length is specified.

http://svn.apache.org/viewcvs?rev=367226&view=rev

So for example, to treat line endings (either "\n" or "\n\r") as a length of 1

  <field property="foo" depends="required,minlength,maxlength">
      <var>
          <var-name>lineEndLength</var-name>
          <var-value>1</var-value>
      </var>
      <var>
          <var-name>minlength</var-name>
          <var-value>5</var-value>
      </var>
      <var>
          <var-name>maxlength</var-name>
          <var-value>20</var-value>
      </var>
  </field>

This will be available in the next nightly build:

  http://cvs.apache.org/builds/jakarta-commons/nightly/commons-validator/

However, if your using this with Struts the Struts FieldChecks class needs to 
be modified for the server side validation in Struts to work with this change. 
Struts will be changed once the next release of Commons Validator has been 
done. I have opened Bug 38191 against Struts in order that it doesn't get 
forgotten.

Closing this as FIXED

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

Reply via email to