DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Validator errormessage is not displayed

Sort:
You are not authorized to post a reply.





Veteran Member





    Hi,

    I have a strange problem, and it seems that this is pretty much the same as described here: https://stackoverflow.com...equired-after-upgrad

    The problem is not that the validator does allow to submit when invalid data is inserted, but the error message is not displayed. The form is not submitted, but the user has no idea why.

    The validators's CssClass property is set to "dnnFormMessage dnnFormError", and does not display the error message when it should (eg, a RequiredFieldValidator when the field is empty). For other validators on the same form, it works, for some not, and this seems not to be dependant on the validator's type, eg. it does not work for a RequiredFieldValidator, and I have two custom validators that I wrote by myself, it works for one but not for the other (both are the same validators).

    When I use the developer tools and remove the "display:none;" part from the span element, the error message is displayed.

    When I use another CssClass property (e.g. "NormalRed") it displays the error message, in this case in red letters, and even if I use "dnnPrimaryAction" it displays a blue button with the error message on it (which is a stupid idea, but it was just a test to find out what could be the cause of this behaviour). Obviously, it it not the validator itself, but the style class or some script that modifies the style class.

    The workaround provided in the stackoverflow question works, but this can't be the proper solution. Any ideas?

    (DNN 9.5.0 in my case)

    Happy DNNing!
    Michael

     

    Michael Tobisch
    DNN★MVP

    dnnWerk Austria
    DNN Connect





    Veteran Member





      It seems that there is too less place to display the error message for the first form field - after adding a header (h2) above the form, the message is shown.

      Seems to be kind of a bug...

      Happy DNNing!
      Michael

      Michael Tobisch
      DNN★MVP

      dnnWerk Austria
      DNN Connect
      You are not authorized to post a reply.

      These Forums are dedicated to the discussion of DNN Platform.

      For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

      1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
      2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
      3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
      4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
      5. No Flaming or Trolling.
      6. No Profanity, Racism, or Prejudice.
      7. Site Moderators have the final word on approving / removing a thread or post or comment.
      8. English language posting only, please.

      Would you like to help us?

      Awesome! Simply post in the forums using the link below and we'll get you started.

      Get Involved