An open API service indexing awesome lists of open source software.

https://github.com/gemorroj/htmlvalidator

port PEAR package Services_W3C_HTMLValidator
https://github.com/gemorroj/htmlvalidator

htmlvalidator pear w3c-validator

Last synced: 9 months ago
JSON representation

port PEAR package Services_W3C_HTMLValidator

Awesome Lists containing this project

README

          

# Port PEAR package [HTMLValidator](http://pear.php.net/package/Services_W3C_HTMLValidator)

[![Continuous Integration](https://github.com/Gemorroj/HTMLValidator/workflows/Continuous%20Integration/badge.svg)](https://github.com/Gemorroj/HTMLValidator/actions?query=workflow%3A%22Continuous+Integration%22)

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

### Requirements:

- PHP >= 8.0.2

### Installation:
```bash
composer require gemorroj/htmlvalidator
```

### Example:

```php
validateFragment(' ');
$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());
```