Skip to main content
Inspiring
April 27, 2011
Question

Why is HTML showing in the form validation message?

  • April 27, 2011
  • 1 reply
  • 3317 views

Here is what is showing when I use server side form validation.

<ul><li>You must select a location </li></ul> Go <a href="javascript:history.back()">back</a> and correct the problem.

Obviously, the HTML tags are not supposed to be shown.  What's going on here?  I just upgraded to CF9 on Linux and this started happening.  Any ideas?

    This topic has been closed for replies.

    1 reply

    Inspiring
    May 2, 2011

    Anybody?  Seems like this would be a common problem and maybe I'm missing something simple.

    Inspiring
    May 3, 2011

    It's impossible to really comment on this without you providing some (stand-alone, self-contained) steps to reproduce this.  Otherwise we need to just guess what you're code says (which is a mug's game).

    --

    Adam

    Inspiring
    May 3, 2011

    It's a standard CF server-side form validation and looks like this on the form:

    <input type="hidden" name="somefield_required" value="some field is a required field">

    When they submit the form (and didn't enter something for somefield), the automatic message comes up.  The formatting of the message is messed up on CF9.  I've been using this type of server-side validation for years (probably since CF5) and have never seen this problem before.

    Actually, this works fine on another server (CF 9,0,0,251028) but on CF 9,0,1,274733 it is having this issue.  Both are running CF Enterprise on Linux.

    Error message is supposed to look like this:

    Form entries are incomplete or invalid.

    • some field is a required field

    Go back and correct the problem.

    The messed up message looks like this:

    Form entries are incomplete or invalid.

    <ul><li>some field is a required field</li></ul> Go <a href="javascript:history.back()">back</a> and correct the problem.