Skip to main content
AlexCraig
Inspiring
January 15, 2024
Question

Form entries are incomplete or invalid. Form entries are incomplete or invalid.

  • January 15, 2024
  • 5 replies
  • 2720 views

Note:  I posted this earlier, but forgot to tag it with topics & I don't see anyway to edit my post.  I apologize for the duplication.  But it is not showing up under discussions.

 

Greetings all!


In CF 4.51 the following validation code:

"<INPUT TYPE="hidden" NAME="minPermSal_range" VALUE="MAX=999999;MIN=10000">"


Produced the server side response if your field entry was invalid:

*********************************************
Form Entries Incomplete or Invalid

One or more problems exist with the data you have entered.

The value entered for the Minpermsal field must be between 10000 and 999999 (your entry was 5).


Use the Back button on your web browser to return to the previous page and correct the listed problems.

*******************************************


In CF2023 we get:

*********************************************
Form entries are incomplete or invalid.

"<ul><li>The range for the MINPERMSAL field ('5') must have numeric values. </li></ul> Go <a href="javascript&colon;history.back()">back</a> and correct the problem."

***********************************

To begin with the validation message is incorrect the field in question is defined as a VARCHAR field both in SQL/Server & in CF.


That aside, I don't suppose there is a CF Admin setting that I missed that would have this function as it did in 4.51?


I took a look at other previous posts involving "Form Entries" & I suspect there is not. If not, I guess I will need to wirte a ton of JS validation code to replace what was a relatively simple way of validating entry fields. <sigh/ugh>


As always, thanks in advance for any help.

5 replies

Participant
February 10, 2024

The discrepancy in validation messages between ColdFusion 4.51 and 2023 may stem from platform updates. No CF Admin setting likely replicates the 4.51 behavior. Adapt by implementing JavaScript validation to mimic previous functionality. Given the VARCHAR field, ensure validation handles non-numeric inputs. While an additional task, client-side validation enhances user experience with instant feedback. Monitor ColdFusion documentation and forums for insights into changes and best practices. Remember, thorough testing is crucial to ensure validation accuracy and user satisfaction.

AlexCraig
AlexCraigAuthor
Inspiring
February 10, 2024

CF Support has verified that this is a bug and is tagged as "Being Investigated" in the Bug Tracker.

How long the investigation process will take and what steps will be taken is unknown at this point.

Alex Craig, General Manager&quot;Avid Saltwater Fly Fisherman&quot;
Participant
March 7, 2024

ColdFusion 4.51 and the latest version in 2023 could result from platform advancements. It's unlikely that any CF Admin setting mirrors the 4.51 behavior. To address this, consider incorporating JavaScript validation to replicate the previous functionality. Specifically for VARCHAR fields, ensure the validation accommodates non-numeric inputs. Though an extra task, implementing client-side validation provides immediate feedback, enhancing the user experience. Stay updated with ColdFusion documentation and forums for insights into changes and recommended practices. Keep in mind that thorough testing is essential to guarantee the precision of validation and overall user satisfaction.

Participating Frequently
February 10, 2024

For the discrepancy in validation messages between ColdFusion 4.51 and 2023, first check ColdFusion Administrator settings for relevant configurations. If none are found, adapt to changes by implementing client-side JavaScript validation for simplicity and customized error messages. Given the VARCHAR field, ensure the validation logic handles non-numeric inputs. Although an additional task, client-side validation enhances user experience with instant feedback. Stay informed by monitoring official ColdFusion documentation and community forums for insights into changes and best practices in the latest versions.

BKBK
Community Expert
Community Expert
January 27, 2024

I think that the presence of the semi-colon(;) is the cause of the problem.

 

VALUE="MAX=999999;MIN=10000"

 

As @AlexCraig has already shown, replacing the semi-colon with a comma(,) solves the problem. The following (a space in place of the semi-colon) would also work

 

VALUE="MIN=10000 MAX=999999"

 

Guess what?

Searching further, I found that the two currently documented delimiters to use are comma and space.  See the documentation on cfinput's range attribute and the page "Validating form data using hidden fields".

 

 

AlexCraig
AlexCraigAuthor
Inspiring
January 27, 2024

It does not solve the major problem. It only solves the "numeric" reference.

And the latest word from the bug tracker is that the bug has been confirmed & they are continuing to investigate.

A picture is worth a thousand words.  Here are screen shots that illuminate the problem.

As you can see, CF 4.51 renders a user friendly validation screen and CF 2023 using a comma does not.

Alex Craig, General Manager&quot;Avid Saltwater Fly Fisherman&quot;
BKBK
Community Expert
Community Expert
January 27, 2024

Got your point, @AlexCraig . There are actually two issues: (1) the display of the HTML as text, and (2) the incorrect response when the delimiter is the semi-colon.

 

My response was about the second.

Participant
January 22, 2024

I am currently in the process of migrating from ColdFusion 4.51 to ColdFusion 2023, as mentioned in the subject line and the first line of my initial inquiry. However, it seems there might be a misunderstanding, as your response requests the version I am planning to migrate from.

To clarify, I am migrating from ColdFusion 4.51 to ColdFusion 2023. If you require any additional information or if there's a specific process I should follow, please advise.

AlexCraig
AlexCraigAuthor
Inspiring
January 22, 2024

Mehwish,

 

In response to your email with the Subject "Did you get the answer you needed?"

 

After a bit of back & forth with support to include some screen shots, I was told to create a Bug report via your Tracker link.

 

I created CF-4220336 on 1/19.  Have not heard back as yet.

Alex Craig, General Manager&quot;Avid Saltwater Fly Fisherman&quot;
Charlie Arehart
Community Expert
Community Expert
January 15, 2024

Alex, when I first wrote, I focused on how CF form validation is done via cfinput (and I showed how even the cf docs for 4.51 showed that), and how that approach requires a comma-separated min/max value for its RANGE feature. I wondered if instead you had some other js library using the attributes of the input tag as you showed it. 

 

Then I noticed it was both a hidden input,with a NAME field ending with _range as a suffix, AND that validation in the VALUE attribute. That reminded me there was another, older form of field validation cf did that was entirely server side (thus your message). I've not seen it in years, but it was coming back to me. 🙂 

 

And sure enough, I found another cf 4.51 docs page on that, showing the min/max specified as you do. Note that it's not in the cfml reference, because it's not a cf tag, but a way cf handled form fields based on the suffix of their names, as with _range in your example. 

 

Anyway, the current docs for that page don't show that range being supported at all, which suggests Adobe deprecated it...but clearly it's still "working" for you. 

 

Can you try just changing the value to "10000,999999" to see if that works? I'm on a phone so can't easily test that myself. 

/Charlie (troubleshooter, carehart. org)
Charlie Arehart
Community Expert
Community Expert
January 15, 2024

Alex, if you may have gotten notified about my first reply, I've found more info. Hold off on replying to what I said until I correct that. 🙂 

/Charlie (troubleshooter, carehart. org)
AlexCraig
AlexCraigAuthor
Inspiring
January 15, 2024

Hey Charlie,

 

Thanks for both replies.

 

FYI, there is no CFINPUT in my current code.

 

Depending upon your next reply, I can reply with all the code which is relevent to this datafield.

 

Best regards!

Alex Craig, General Manager&quot;Avid Saltwater Fly Fisherman&quot;