Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/segment-boneyard/validate-form-tip

A tooltip error message plugin for validate-form.
https://github.com/segment-boneyard/validate-form-tip

Last synced: about 7 hours ago
JSON representation

A tooltip error message plugin for validate-form.

Awesome Lists containing this project

README

        

# validate-form-tip

A tooltip error message plugin for validate-form.

## Installation

$ component install segmentio/validate-form-tip

## Example

![](https://i.cloudup.com/E8uGdvIfZM.png)

```js
var validate = require('validate-form');
var tip = require('validate-form-tip');
var form = document.querySelector('form');

validate(form)
.use(tip({ position: 'west' })
.field('username')
.is('required')
.is(function (val, done) {
isUnique(val, function (err, res) {
done(res.body.unique);
});
});
```

## API

### tip(options)

Generate the `tip` plugin for `validate-form` with `options`:

{
duration: Number,
effect: String,
position: String
}

## License

MIT