Comments (4)
Hi, please create a minimal test case as per the requirements of opening an issue such as this.
There is a link to a jsbin template when you create a new issue.
from tagify.
ok I understand your point
I didn't get the Validate function behaviour correctly so I had to do all this stuff
Thanks for your kind help
from tagify.
Hi thanks for your reply
I wasn't aware of how to use jsbin, now it's ok
test case: https://jsbin.com/fejaweveyi/edit?html,js,console,output
add a good tag ( [email protected] )
then add 2 erroneous ones like "something" and "somethingelse"
edit "something" to "[email protected]" and somethingelse becomes valid
from tagify.
- you've included Tagify twice in the demo page
- you've mis-used tagify in the way you are validating tags and therefore you created the bug you reported for.
- your demo is way too complex. you should have removed 80% of the code to keep it minimal and reproducible.
You should be using the validate
settings, as seen in a simplified version of your demo page:
https://jsbin.com/farasel/edit?html,js,output
function isEmail(value) {
const emailRegex = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/gm
return emailRegex.test(value)
}
var element = document.querySelector('textarea');
let tagify = new Tagify(element,{
keepInvalidTags: true,
duplicates: false,
pasteAsTags: true,
validate({value}) {
return isEmail(value)
}
})
from tagify.
Related Issues (20)
- Console warning on tag addition via enter key HOT 1
- Warning in Console: [Tagify]: Cannot find element in Tag template: . .tagify__tag-text HOT 1
- mix mode : pressing the down key at the end of line displays drop-down list
- Multiple init Tagify HOT 1
- Sprockets error in Rails 7 due to filename change in v4.25.0
- Intermittent error in setRangeAtStartEnd HOT 3
- prop-type error HOT 9
- Clicking outside doesn't close dropdown in select mode and tagX class is blank
- Options not filtered in select mode, userInput=true and tagX='' HOT 1
- in 4.26.2 value cannot be non-string in users-list example
- A double tag is created for delimiter when typed HOT 3
- react.tagify.jsx Failed to compile HOT 3
- Ignore an email address in the middle of an sentence HOT 1
- Tagify selct mode incorrect behavior HOT 7
- React className property supports only one class
- "Uncaught (in promise) TypeError: t is null" when pressing Tab key with empty input and dropdown is shown
- default highlighting of selected value in single-select mode in the dropdown HOT 4
- autoComplete.rightKey = true, mode = null (Default), two problems with the rightKey behavior
- We Insert HTML Tags Or some text between '<' and '>' its remove from textarea when edit HOT 2
- On mobile device keyboard automatically adds space after dot type so it's not possible to write an email to tag
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tagify.