Keith Nicholas
Keith Nicholas

Reputation: 44298

How do you get rid of "Validation (XHTML 1.0 Transitional): Attribute 'data-bind' is not a valid attribute of element"

Is there a nice way I can get rid of this in visual studio 10 when using knockoutjs? It just pollutes the warnings.

Upvotes: 27

Views: 14699

Answers (4)

christine
christine

Reputation: 51

After doing what Darbio suggested, I use following code on top of my page.

<!DOCTYPE html>
<html>

Upvotes: 0

Utsav Jain
Utsav Jain

Reputation: 1

First I could not get 'onbefore' events in XHTML Validation So I have changed some options to get rid of XHTML Validation :

For Visual Studio 2008 - Tools > Options > Text Editor > HTML > Validation and switch the validation to Internet Explorer 6.0.

After I can get the 'onbeforepaste' event in suggestions.

Upvotes: 0

user2686690
user2686690

Reputation: 205

After doing what Darbio said above, I also add this <!DOCTYPE/> on top of the page.

Upvotes: 1

Darbio
Darbio

Reputation: 11418

Yes you can do this in VS 2010 SP1 and VS 11 Developer Preview

Tools > Options

Select:

Text Editing > HTML > Validation

And select XHTML5 or HTML5 from the drop down list

enter image description here

Upvotes: 45

Related Questions