validator-nu-angular

NU Validator for AngularJS

Usage no npm install needed!

<script type="module">
  import validatorNuAngular from 'https://cdn.skypack.dev/validator-nu-angular';
</script>

README

Nu Validator for AngularJS

Build Status devDependency Status Dependency Status Code Climate

NPM

What This?

This is a wrapper of node-validator-nu for angularJS

What differences between node-validator-nu and this?

node-validator-nu checks "pure" HTML. i.e. There are tags sandwiched between html+header, and body. However AngularJS templates, esp template page and directive, are not sandwiched between html stuff.

This API wisely sandwiches template code with html stuff. Of course, you can check normal pages.

How to use

Also just simple:

/*global exports, require*/
(function (exports, require) {
    var vnu = require("validator-nu-angular");
    // Put HTML data, not the name of the file.
    vnu.validate("html here", function () {
        // callback
    });
    // If you got validatornu was not found, set vnu path to 3rd parameter.
    vnu.validate("html here", function () {
        // callback
    }, "/usr/bin/vnu.jar");
}(exports, require));