Ben Nadel
On User Experience (UX) Design, JavaScript, ColdFusion, Node.js, Life, and Love.
I am the chief technical officer at InVision App, Inc - a prototyping and collaboration platform for designers, built by designers. I also rock out in JavaScript and ColdFusion 24x7.
Meanwhile on Twitter
Loading latest tweet...
Ben Nadel at the jQuery Conference 2010 (Boston, MA) with:

New ColdFusion Error: Form Entries Incomplete Or Invalid

By Ben Nadel on
Tags: ColdFusion

I just got a ColdFusion error that I have never seen before:

Form entries incomplete or invalid. Please go back an correct the problem.

Here is the uber-useful ColdFusion error screen:


 
 
 

 
ColdFusion Form Field Validation Error  
 
 
 

This is about the most useless ColdFusion error ever! How could I even go about debugging this? They don't even give me a template or a line number or even what FORM value they might be talking about. I started commenting out all the code I had just put in until I narrowed it down to this code:

  • <input
  • type="text"
  • name="usage_cap_time"
  • value="#FORM.usage_cap_time#"
  • />

Ahhh, then it hit me. TIME. This form field ends with the word "Time." This has to be one of ColdFusion's worst features every brought / kept into existence; because this form field ends with "time," ColdFusion will try to validate the form field "usage_cap" as being a valid time value.

Does anyone even use this ColdFusion validation style? How do you sleep at night :)


Looking For A New Job?

100% of job board revenue is donated to Kiva. Loans that change livesFind out more »

Reader Comments

Yeah, there are a few of those that trigger the autovalidation. Like _required for example.

We should have asked for an application-wide setting to disable that 'feature'.

I haven't seen anyone actually use the convention validation, I have seen folks spend a lot of time trying to diagnose the resulting, and unintentional, error.

Put it in the same bucket as <cfinsert> and <cfupdate>

Reply to this Comment

Crazy! I didn't realize it would even do that for an INPUT tag. I thought it only matters if you use CFINPUT / CFFORM.

Reply to this Comment

Yeah it is crazy :) I think was left over from the days before any real validation was available or something. I think it is time that ColdFusion dumped this from its backwards-compatability.

Reply to this Comment

Yes and _required and _numeric have caught me in the past when just using the names that someone else used for data in the database!!

Took me hours to debug the first time. Now I warn all students who attend my calsses so that hopefully it won't get them too.

Reply to this Comment

Here's a funny couple ones, try _applied or _employed. Those seem to fail for me no matter what. I definitely agree that this is as dumb of a feature as building an application server on java (I have to restart it or close file handles just to modify .html files.) The development cycle of using coldfusion is hilarious compared to more professional solutions.

Reply to this Comment

@Xedecimal,

That is so crazy that those would fail. They don't even make sense (from a validation standpoint).

Reply to this Comment

I asked around for some kind of reference to a list of these 'dumb' names. It was suggested that they don't even have a list of them. I dug around for a while and found these urls...

http://www.chapter31.com/2007/04/24/unwanted-coldfusion-form-validation/
http://cfsilence.com/blog/client/index.cfm/2007/2/27/cfform-Server-Side-Validation-Gotcha
http://www.mischefamily.com/nathan/index.cfm/2007/7/21/ColdFusions-Serverside-Form-Validation
http://livedocs.adobe.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentation&file=00001385.htm

So this isn't the only place having a blast with this error. Maybe the new Adobe purchase of the good stuff as well as the bad stuff *cough*coldfusion*cough* will allow them to make it better, ha, ha ha, that's funny.

Reply to this Comment

@Xedecimal,

That list on the LiveDocs is pretty big. They really just need to get rid of this feature altogether or just use the _cfformurl style notation that won't be confused with other valid field names.

Reply to this Comment

It's not just the "time" I had fields ending in "date","creditcard", "digits", etc... and each one of those had the same thing trailed by a "_msg". I cured the problem by ending the value form element with an "_1" and the message form element with a "_2" just so that it was easy to process the forms with the message for each one. This is for a jQuery validation generator that i'm working on that allows you to go through a gui to build your validation and to override the built in validation.

Either way, i know if i see this sucker come up again that it has to do with the naming convention.

You saved me time with this post, thank you!

Reply to this Comment

Thanks so much for your post. I've been debugging a related error for about two hours now. It was especially odd in that I had two fields, START_NOTICE and START_NOTICE_TIME. Two fields, one with a date and one with the time. Well, for some strange reason, my field START_NOTICE starts taking on the value of "0" and spitting out "1899-12-30" in the FORM scope! After reading this post, I changed the name of START_NOTICE_TIME to START_NOTICETIME and it just all worked! Somehow the validation on the time field was affecting the related field START_NOTICE. I think that is even stranger than the problem with the "_time" in the field name. At least it has stopped. :-)

Reply to this Comment

@Brad,

Yeah, that's some old-school, built-in validation. Nobody likes it; I am not sure why it is even still part of ColdFusion.

Reply to this Comment

thanks for clarifying this. I ran into the exact same problem with a form field called 'invoice_date'. It was working until today, which was very strange. I did add a file upload form field today, so I wonder if it has something to do with that.

Reply to this Comment

But wait! It gets worse!

I would get an error like the one above on the fields item_arrival_time and item_departure_time, too, depending NOT on the content of those same two fields, but on the content of two different ones (item_departure and item_arrival) being a valid date or not.

It has driven me crazy (when I least needed it)!

If I wanted coldfusion's built-in validation, I'd have used cfform and cfinput, thank you.

Grrrrrrr.

Reply to this Comment

@Andrea,

Voicing a problem with ColdFusion is never "useless". Hopefully, the more people that complain about this implicit validation, the more likely they will to finally remove it from the language. I don't think anyone actually uses this on purpose.

Reply to this Comment

I just had another one. I named my field pub_discl and it gave me this Form Entries Incomplete or Invalid. It's really crazy. I was able to rename to something else after I saw all of your posts. Thank you!

Reply to this Comment

Cripes. I just got this error for the first time in my CF "lifetime" today. Talk about freaking hard to figure out. Adobe, sometimes, you're trying too hard to be helpful. Don't validate unless we *ask* you to. ;-)

Reply to this Comment

That is great, but at the moment, I'm going to have to wade through 250 form fields (across many pages) and hunt this bugger down.

Reply to this Comment

Hi Ben
I'm just adding another "cheers for blogging this" note: I just got bitten on the bum by this and it was doing my head in as to WTF was going on, until I read your blog post. So: cheers!

I'm developing an app for BlueDragon (bleah, but not my call), and notionally have to have it working on CF8 & 9 as well. BD - bless - doesn't have this stupid validation "feature" it seems, so everything was fine until I came to test something on CF. Boom.

I'm now used to pulling my hair out over the vagaries of BD compared to CF... this is the first occasion I've been pulling my hair out because of a CF "vagary" (although, to be frank, BD *should* implement everything CF does, even if the CF "feature" is a dumb idea).

Anyway... thanks.

--
Adam

Reply to this Comment

@Lou,

Glad to help. Not that this is a help to you right now (maybe), but at least they *finally* built it into ColdFusion 9 that you can disable this functionality in the CF Administrator.

@Adam,

Yeah, this is just a ridiculous error. Honestly, I am surprised that anyone ever used it. I can't see how this feature was ever functional. I mean, look at the error! It's not like the user would even know what to do with it.

Reply to this Comment

@Casey,

Really?? I wonder what kind of validation that would even be in reference to? What is a recorder?

Reply to this Comment

Just want to chime in with another thank you for posting. How insane! Mine was blah_blah_required. What a useless error message!

Reply to this Comment

@Emily,

Glad this helped. If you are upgrading to ColdFusion 9 any time soon, you can actually turn this feature off (or so I'm told).

Reply to this Comment

Well, it's partially your solution too! Let's call it the shared solution that saved us all lot's of time!

Reply to this Comment

How gay is this "feature"!!! Thank god you had this entry Ben - I had just created a field called finance_required and started getting this error. As my attention span is diminishing as I approach 40 I'd forgotten I'd added the field this morning..

Cheers

Reply to this Comment

Once again you save my day Ben. Just migrated from Railo to CF9 and that error was everywhere, I was on the verge of tears...

Reply to this Comment

@Pedro,

The good news is that in CF9, you should be able to disable this feature in the ColdFusion admin without having to change your code.

Reply to this Comment

Hello,

I had the same problem. The name the field was registration_required. I replaced it by registration_needed and the problem was solved.

David

Reply to this Comment

Sweet to finally know what causes this error. I've always been able to work around it by ultimately by appending "_1" to the offending variable, but I never knew why I had to!

Cheers,
Ty

Reply to this Comment

You guys are just too young to remember when this was a very useful feature of standard HTML! And I am so old that I forgot all about it. There is even a good chance some of my old clients still have it in their code.

I knew there was a reason I never used underscores in forms. Thanks for the reminder Ben!

Reply to this Comment

@Aimee,

Yeah, I've gotten used to using camelCase in my form variables (well, pretty much everywhere actually). And, I'm loving the shift. The problem is, I have loads of old code that uses "_" as the term separator for *everything*. It try to err on keeping an app consistent rather than mix-n-matching; though, sometimes, I can't resist using camelCase despite the inconsistency - it's just so much nicer (in my opinion).

Reply to this Comment

I seem to hit these related validation issues once a year, this was probably the quickest I resolved it thanks to this post.... I was wondering why they had named one variable in a different format than the other 200+.

Reply to this Comment

I received the same error using "letter_required" as a field name. Changing it to letterRequired fixed it.

Cold fusion sure is cold, Brrrrrrrrrrrrr.

Reply to this Comment

Post A Comment

You — Get Out Of My Dreams, Get Into My Comments
Live in the Now
Oops!
Comment Etiquette: Please do not post spam. Please keep the comments on-topic. Please do not post unrelated questions or large chunks of code. And, above all, please be nice to each other - we're trying to have a good conversation here.