Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8470525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T16:32:36+00:00 2026-06-10T16:32:36+00:00

I am trying to integrate knockout validation and twitter bootstrap in this editor: http://jsfiddle.net/casudeo/Jbp7y/18

  • 0

I am trying to integrate knockout validation and twitter bootstrap in this editor: http://jsfiddle.net/casudeo/Jbp7y/18

I’d like to apply twitter bootstrap’s css for input errors. To do that, I would need to somehow “walk up” to the control-group div and add an ‘error’ class to it. Is there a way to achieve this without modifying the css files?

Additional clarification because of dominik’s comment below:
1) Click the “Add” button to add a new item.
2) Try to save with blank values.
3) KO validation will catch invalid inputs. However, I would also like to apply an “error” css class to highlight invalid fields.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T16:32:38+00:00Added an answer on June 10, 2026 at 4:32 pm

    Here is an updated fiddle: http://jsfiddle.net/jearles/Jbp7y/147/

    HTML

    <div><button data-bind="click: clickMe">Click Me!</button></div>
    

    JS

    var ViewModel = function() {
        var self = this;
        self.clickMe = function(data,event) {
          var target;
    
          if (event.target) target = event.target;
          else if (event.srcElement) target = event.srcElement;
    
          if (target.nodeType == 3) // defeat Safari bug
            target = target.parentNode;
    
          target.parentNode.innerHTML = "something";
        }
    }
    
    ko.applyBindings(new ViewModel());
    

    The things I changed:

    1. Add ‘validationElement’ bindings to the control-group divs
    2. Add a call to ‘showAllMessages()’ when errors are detected
    3. Ensure the errorElementClass configuration is set to ‘error’
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to integrate bean validation using hibernate validator to my web application :
I am trying to integrate NHibernate.Search into a multi-lingual website. Now, this website contains
I am trying to integrate OpenFeint 2.12.5 into my app. I already read this
I'm trying to integrate Jawr into my Spring application: <bean abstract=true id=jawrBase class=net.jawr.web.servlet.JawrSpringController> <property
I am trying to integrate this particular app in my website. When I load
I'm trying to integrate Twitter in my android application. I've checked Android10 and abhinavblog's
I am trying to integrate facebook with in my asp.net mvc web application using
I am trying to integrate SWFUpload into Joomla (customized implementation, and this is why
trying to integrate hibernate and spring ,I ran into this error SEVERE: Context initialization
I'm trying to integrate twitter to my app, but I can't seem to get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.