Skip to content

An add on to automatically run W3C validation on pages that you are developing

License

Notifications You must be signed in to change notification settings

PalFed/Auto-W3C-Validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Auto W3C Validator

View Demo Page

I built this validator while I was building PalFed to make sure that all of the pages I was generating with php and updating via ajax contained valid markup. This Validator utilises The W3C Markup Validation Service combined with the validator.nu HTML5 validator to provide a fast and easy way to ensure that your web apps produce valid HTML5 as you develop them.

In order to use it, you will need to install a local copy of the W3C Markup Validator. There are instructions on how to do this in many places on the web, you can also use the instructions that I wrote while I was creating the tool.

Once you have the W3C validator installed locally, copy the src/validator.config.sample.php file to src/validator.config.php and update it with the details for your installation. You will need all the files in the src folder to make it work. The files in the root folder are for the demo page only.

On any page that you would like checked, simply include src/validator.css in your (development) CSS and add

<script src="src/validator.js"></script> 

at the bottom of the page.

There is a hosted example of this at https://validator.palfed.com/ so you can see it in action, however it is on a low power dev server, so if you get connection errors, just click re-check. For my development, I am running on a local installation with validator and my development site both on a Virtualbox VM on my laptop and I have never had connection errors.

Note that the Auto-W3C-Validator is intended to be used for development and not on production systems.

About

An add on to automatically run W3C validation on pages that you are developing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published