knockout.js - Set backgroung color of input in case of an error -


There is a problem with pushing and validating me when there is an error, I would like to paint my input

The problem is that when I use the knockout.validation library with github, there is an error:

  {"error": "Please use post request"} < / Code>  

View:

  ko.validation.configure ({insertMessages: false, decorating element: true, error ElementClass: 'error'});   

And when I use it from the CDN, there is no error, but the color does not work.

Look:

Thank you. < P> Your second example with the CDN in the CSS field is & lt; Style & gt; tag. As the value of your form is bound to model.toValidate (), you can modify the self.validate1 function as the following:

  self.validate1 = function () {self. toValidate (self.toValidate () || ''); };   

Do this:

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -