Comments (2)
@mikemaccana Looks like there were actually a few copies of tags-input.js on that page and the one being used didn't have a placeholder defined. I've modified it to just use one copy. Also the placeholder
attribute is a pre-anchored regex, so the pattern was invalid. Here's an example with a valid placeholder and some CSS to show validation state:
http://jsfiddle.net/developit/nL1h3dwk/
However, you're right - the field gets marked as invalid like we would expect, but tags-input
doesn't care and happily adds the tag. The fix here should be pretty simple - we need to have the method that commits a tag from the input field first check that input.validity.valid
is true
.
from tags-input.
PS - thankyou Jason!
from tags-input.
Related Issues (15)
- ToDo: Convert to ES2015, use Babel HOT 1
- JSFiddle Demo is broken. HOT 2
- JSFiddle Demo is broken. HOT 1
- browser support HOT 1
- Glitch when blurring tags field HOT 10
- Keyboard events created with DOM don't trigger
- Long placeholders get cut off
- Unexpected behaivor on Russian keyboard layout
- Wrong key code on Turkish keyboard
- Please delete.
- Update less
- Height of input briefly doubles for a moment while adding first tag HOT 1
- Should copy some attributes from source input (eg: spellcheck)
- MIT or 3 clause BSD HOT 1
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 tags-input.