Gemorroj / HTMLValidator

port PEAR package Services_W3C_HTMLValidator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Port PEAR package HTMLValidator

Continuous Integration

Rewritten to use the new API https://validator.w3.org/docs/api.html

Requirements:

  • PHP >= 8.0.2

Installation:

composer require gemorroj/htmlvalidator

Example:

<?php
use HTMLValidator\HTMLValidator;

$validator = new HTMLValidator();
$result = $validator->validateFragment('<html lang="en"><body> </body></html>');
$result = $validator->validateFile('/path/to/file.html');
$result = $validator->validateUri('http://example.com');

var_dump($result->isValid());

print_r($result->getErrors());
print_r($result->getWarnings());

About

port PEAR package Services_W3C_HTMLValidator

License:GNU Lesser General Public License v3.0


Languages

Language:PHP 100.0%