Issue with CF Server Side Validation

This post is more than 2 years old.

So, I ran into what I thought was a bug today. The issue involved CF's built-in server-side validation (where you use hidden form fields to mark form items as required, and apply certain validation fields). I don't use this feature very often (this was a client's site) so I had to read a bit to see what was going on. The client had set it up so that a field for the phone number was marked as required, and marked as being integer only. When I entered a phone number like 9999999999, it returned another number. This happaned every time... until I entered 1112223333. What was happening was that 9999999999 was over Java's maximum size for Integer values. The bug then is that CF should have said my number was too high instead of simply changing it to the maximum number.

Raymond Camden's Picture

About Raymond Camden

Raymond is a senior developer evangelist for Adobe. He focuses on document services, JavaScript, and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA

Archived Comments

Comment 1 by Jeff Wilkinson posted on 1/16/2004 at 9:14 PM

why would they have a phone number field defined as integer instead of as text anyway?