Validation errors in code view

Habitat constantly validates that all the HTML code for a project is valid. When a file contains invalid code, Habitat:

  • Displays an orange banner with the error message There are validation errors; please correct them in code view.
  • Opens the Code Mode view and displays a red X icon adjacent to any line that contains invalid code.
  • Disables the Save button and prevents you from saving any changes.

 Anti-virus software conflicts with Habitat

Some anti-virus software, like Kaspersky Anti-Virus, may insert (or inject) a script into the content of your Habitat project that our system does not recognize as valid HTML code.

The injected code is in between the <head></head> tags of a file and generally looks like this:
<script type = "text/javascript" src="" charset="UTF-8"></script>

You can find this script code next to the red X when the HTML Code Mode is activated, after you receive the validation error. We recommend first disabling Kaspersky while working in Habitat and then deleting that line within the code in the console. After this you remove this line, you should be able to save the file.

Note that Chrome may have cached the page that is receiving the error. If you still experience this error after disabling the script injection, clear your cache and cookies using these steps:
1. Click the Menu button (three vertical dots located to the right of the URL bar).
2. Select More Tools.
3. Select Clear Browsing Data.
4. Check the boxes for Cached images and files and Cookies and other site and plugin data.
5. Click the Clear Browsing Data button.

You can disable this script injection in the newest Kaspersky version (>16.0.1) using:

Settings > Additional > Network > Inject scripts into web traffic to interact with web pages

Disabling this setting should stop the script from being entered into your project while allowing Kaspersky to remain enabled on your system.

Have more questions? Submit a request


Article is closed for comments.
Powered by Zendesk