Validation without message

Validation without message

yakseyyaksey Posts: 9Questions: 4Answers: 0

Is it possible to have a validation on a textfield without an error message?
What I want is that my border gets red but no message is shown because the message displaces all my other fields in my modal.

Replies

  • allanallan Posts: 63,818Questions: 1Answers: 10,517 Site admin

    You could perhaps return the error message as a single space character, or use CSS to hide the error information message which might be better. This document describes the markup structure that Editor uses.

    Allan

  • yakseyyaksey Posts: 9Questions: 4Answers: 0
    edited October 2016

    Hey Allan,

    thanks for your reply.
    I already tried to use CSS before my post but it didn't worked out as I wanted.

    div.DTE_Field div.help-block {
    visibility: hidden;
    }

    hides the message but the <div> with the error message still gets bigger and displaces my other fields.

    I also tried an additional display: none; but this won't work, because it gets overwritten by the action and in the end the <div> with the error message has display: block; again.

    Is this the way, you would've used CSS to hide the error message or did you mean another way?

  • allanallan Posts: 63,818Questions: 1Answers: 10,517 Site admin

    Have you tried display: none !important;. That should override the Javascript applied styling as !important takes precedence.

    Allan

  • yakseyyaksey Posts: 9Questions: 4Answers: 0

    display: none !important; solved the problem – why didn't I come up with this myself?

    Thank you, Allan!

This discussion has been closed.