Skip to content

Programmatic Use

Choose a tag to compare

@jamesseanwright jamesseanwright released this 24 Nov 18:54
· 24 commits to master since this release

Valimate can also be imported into your Node.js scripts as a CommonJS module. It exposes the validate method, which takes the config as a parameter of the Object type. This returns a Promise which resolves once the URLs have been validated. A Boolean is passed through the chain that will be true if the markup is invalid, or false if it is valid.

See the README for example usage.