Comments (4)
One fix would be that Kirby adds
^
and$
to the start/end of the pattern if not already present.
That doesn't sound like a terrible solution honestly
but seems like the HTML attribute is rather defined as exact match (so nothing before or after the match either)
This is what MDN says: The pattern's regular expression must match the entire input's value, rather than matching a substring - as if a ^(?: were implied at the start of the pattern and )$ at the end.
from kirby.
One fix would be that Kirby adds
^
and$
to the start/end of the pattern if not already present.
I think it could even be dumber and simply add them always, no need to check for the presence: /^^foo$$/
matches foo
too
from kirby.
Just curious about what happens if you give it "^\d{4,4}$"
as pattern.
I mean, my guess is that the panel considers it valid if any part of the value matches your pattern.
from kirby.
Yep that's the issue. Backend checks only for any match of the pattern, but seems like the HTML attribute is rather defined as exact match (so nothing before or after the match either). One fix would be that Kirby adds ^
and $
to the start/end of the pattern if not already present.
from kirby.
Related Issues (20)
- Image thumbs: persisting jobs files HOT 5
- [Panel] Dragging a file from a file section into a writer field stores the panel file url HOT 1
- [Panel] Long page title pushes the prev/next page navigation out of view HOT 3
- Resize/crop/thumb functions see longest size of images as width HOT 5
- [Panel] Switching Languages triggers revert / save HOT 1
- Use `slugs.maxlength` when generating slugs HOT 1
- `convert` command deprecated
- Slower navigation requests still go through even if already navigated elsewhere
- Files & Pages field: singular empty text when multiple: false HOT 2
- Media file not deleted after status change HOT 1
- Table layout pages section: interactive previews are not updating content HOT 1
- Classes added by Custom Nodes are stripped out of the Writer field when refreshing the page/ProseMirror re-rendering the Writer HOT 2
- Performance issue: slow pages section with table layout
- Sorting doesn't work as expected if some pages have fixed nums HOT 5
- Page creation dialogue: "add" button is no longer displayed [regression] HOT 1
- IDE support for `Filesystem\Asset` proxied methods HOT 2
- Focus on Blocks is not removed when focus switches to other field
- Change URL dialog: not displaying language URL prefix
- `Html::tag` does not accept whitespace for attributes 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 kirby.