You are here: Reference > Rule types > Text File rules > Text File rules - JavaScript and CSS validation

Text File rules - JavaScript and CSS validation

The Rule-File-Text rule form supports validation errors and warnings for JavaScript and CSS files. This support makes JavaScript and CSS code easier to maintain and allows you to follow best practices while editing the rule.

Validation is performed at the client level without sending the content of the file back to the server for validation, freeing up resources and bandwidth. You can perform validation as needed by clicking Check JavaScript Syntax or Check CSS Syntax at the top of the rule form text area. Error icons are displayed next to the lines that contain errors.

The following types of errors can occur:

For more details about JavaScript errors, go to http://eslint.org/docs/rules/ and append the text in parenthesis from the error at the end of the link.

JavaScript or CSS validation warnings generate a guardrail warning of moderate severity.

CSS validation might return a critical min-width error. The min-width: auto CSS is part of the flexbox layout module and is not part of the CSS3 specification. You can ignore this error