validate

Function validate 

Source
pub fn validate(doc: &Document) -> Vec<ValidationError>
Expand description

Validate an HTML document and return any errors.

ยงExample

use ironhtml_parser::{parse, validate};

let doc = parse("<img>");
let errors = validate(&doc);
// img without alt attribute would be a validation error
assert!(!errors.is_empty());