JavaScript validator with awesome tooltips
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
dist
examples
src
.gitignore
LICENSE
README.md
index.ts
package-lock.json
package.json
process-dts.js
tsconfig.json
webpack.config.js

README.md

npm version npm downloads

Description

NVal-Tippy is a wrapper for NVal and Tippy.js plugins that allows you to display validation errors in tooltips.

Usage

Install

npm install nval tippy.js nval-tippy

Prepare

Import:

import {NValTippy} from "nval-tippy";

or use scripts tag:

<script src="nval.min.js"></script>
<script src="https://unpkg.com/tippy.js/dist/tippy.all.min.js"></script>
<script src="nval-tippy.min.js"></script>

Then: (TypeScript)

var nval = new NValTippy(document.getElementById("myForm"));

(JavaScript, using scripts tag)

var nval = new NValTippy.NValTippy(document.getElementById("myForm"));

Run check

nval.isValid() // Returns boolean.