-
-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pattern
property not working with url fields
#4597
Comments
This is because the url field uses the |
@texnixe |
That’s how I got the idea 🙂 I think it’s no problem if you have a special pattern like mine (and can use a text field instead), the docs just needed to be updated. |
I think we should add the Lines 8 to 13 in cfac315
|
Funny how we both looked at this issue at the same time and came to the same conclusion :D |
To be honest, I was also surprised when you were able to PR so fast😄 |
✅ |
Description
The
pattern
property to validate input doesn’t work with url fields.Expected behavior
Setting a regex pattern that validates user input in the panel should prevent saving differing values.
To reproduce
pattern: '^(http\:\/\/|https\:\/\/)?(www\.)?(vimeo\.com\/)([0-9]+)$‘
https://getkirby.com
Your setup
Kirby Version
Your system (please complete the following information)
Additional context
Changing the field type to
text
makes the pattern validation work.The text was updated successfully, but these errors were encountered: