max-favilli/tagmanager — pull request #4 by coffeeaddict (2012-09-19 18:35:40+00:00)
Title: provide a validator option

to see if the tag is to your likings, usefull for e-mail addresses:

```
$('x').tagManager({
validator: function(tag) {
var isEmail_re = /^\s*[\w\-\+_]+(\.[\w\-\+_]+)*\@[\w\-\+_]+\.[\w\-\+_]+(\.[\w\-\+_]+)*\s*$/;
return String(tag).search (isEmail_re) != -1;
}
```

only when the validator returns ```true``` the tag is accepted (any other true-ish value will be disregarded)

(PS: Great work! Keep it up!)
(PS-II: Another pull-request is already in the making ;)