Title: Checkbox Error Border
Last modified: December 21, 2020

---

# Checkbox Error Border

 *  Resolved [marshallpickard](https://wordpress.org/support/users/marshallpickard/)
 * (@marshallpickard)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/checkbox-error-border/)
 * I would like to put a red border around my required checkboxes when they are 
   not selected.
 * I tried this css but nothing happens
 * span .wpcf7-checkbox-not-valid
    { border: 2px solid #CE0000 !important; }
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcheckbox-error-border%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Takayuki Miyoshi](https://wordpress.org/support/users/takayukister/)
 * (@takayukister)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/checkbox-error-border/#post-13820348)
 * Where in the form do you use the `wpcf7-checkbox-not-valid` class?
 *  Thread Starter [marshallpickard](https://wordpress.org/support/users/marshallpickard/)
 * (@marshallpickard)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/checkbox-error-border/#post-13822276)
 * The checkboxes are set up as required. I have this written as css code in my 
   site. This is the code
 * /* Form Errors */
    span .wpcf7-not-valid { border: 2px solid #CE0000 !important;}
 * span .wpcf7-checkbox-not-valid
    { border: 2px solid #CE0000 !important; }
 * span.wpcf7-not-valid-tip {
    display: none !important; }
 * div.wpcf7-validation-errors {
    background: #ffe2e2; border: 2px solid #CE0000!
   important; width: 100% !important;; color: #CE0000 !important; font-family:’PT
   Sans’; font-size: 16px; } .wpcf7 form.invalid .wpcf7-response-output, .wpcf7 
   form.unaccepted .wpcf7-response-output { border-color: #CE0000; } div.wpcf7-response-
   output { font-family:’PT Sans’; font-size: 18px; background-color:#F0F0F0; line-
   height: 22px; margin-bottom: 2em !important; margin-top: 2em !important; padding:
   15px!important; border-radius: 0px; box-sizing: border-box; -webkit-box-sizing:
   border-box; -moz-box-sizing: border-box; }
 * This is the form code:
 * <label>[text* text-145 placeholder “First Name*”]</label>
    <label>[text* text-
   147 placeholder “Last Name*”]</label> <label>[email* email-584 placeholder “Email*”]
   </label> <label>[text* text-200 placeholder “City*”]</label> <label>[text* text-
   201 placeholder “State/Region/Country*”]</label> Please select one: [checkbox*
   checkbox-719 use_label_element “I am a student interested in more information”“
   I am a College or University interested in membership” “I am a Sponsor interested
   in sponsorship opportunities”]
 * <label>[textarea* textarea-338 placeholder “How Can We Assist You?”]</label>
 * [submit “Send”]
 *  Thread Starter [marshallpickard](https://wordpress.org/support/users/marshallpickard/)
 * (@marshallpickard)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/checkbox-error-border/#post-13840451)
 * The class is used on the three checkboxes. They should become red if one is not
   checked.
 *  Plugin Author [Takayuki Miyoshi](https://wordpress.org/support/users/takayukister/)
 * (@takayukister)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/checkbox-error-border/#post-13842047)
 * Where does the idea come from? In reality no `wpcf7-checkbox-not-valid` class
   is used anywhere in the form.
 *  Thread Starter [marshallpickard](https://wordpress.org/support/users/marshallpickard/)
 * (@marshallpickard)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/checkbox-error-border/#post-13843944)
 * OK. Since they were required, I thought they could have a red “error” border 
   same as when a required text field is left blank. Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Checkbox Error Border’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [marshallpickard](https://wordpress.org/support/users/marshallpickard/)
 * Last activity: [5 years, 5 months ago](https://wordpress.org/support/topic/checkbox-error-border/#post-13843944)
 * Status: resolved