Issue with CF Server Side Validation

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 developer advocate. He focuses on JavaScript, serverless 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 https://www.raymondcamden.com

Comments