I have kind of a fringe case in which the acceptable validation length for a
particular column needs to be different than the length in the database.
The reason is that the setter/getter for that property encrypt/decrypt the
value, so that the length of the encrypted value will be 64 alpha characters
long with the unencrypted value being 9 characters long.  Even though the
actual value of the property is an encrypted 64 char alpha string, the
custom getXxx() returns the unencrypted 9 character string.   Since the
validate() method uses the getXxx() methods, the encryption shouldn't get in
the way of the validation process since I am using the custome getter.

The column in the database is actually set as varchar(255), but I would like
to validate the field to a maxlength of 9.   I think there might be a bug
here unless I am misunderstanding how it should work.  In the dictionary I
changed generated <maxlength>255</maxlength> to <maxlength>9</maxlength>.
Even though I have done this it appears that any length up to 255 still
validates properly and that the <maxlength/> is being ignored.

There are very few cases where you would want to validate a different length
than the database definition, so I am suspecting that this just might be a
bug that hasn't been uncovered.   I realize I can write a custom validation
method as a workaround, but it seems like this should have done the trick.
Does anyone have any input on this?

--
~Dave Shuck
[EMAIL PROTECTED]
www.daveshuck.com

Where's your Spot?
www.instantspot.com


-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Reply via email to