Added a maxlength setting to the regular expression pattern field#17982
Merged
Added a maxlength setting to the regular expression pattern field#17982
Conversation
Contributor
Author
|
Hi @Migaroez - I assigned you this one if that's OK please (as it's for 13.6). Please don't close the linked issue though, as I have a WIP PR for resolving for 15. |
Contributor
You should retarget it to the 13.6 release branch then ;) |
Migaroez
approved these changes
Jan 15, 2025
Contributor
Migaroez
left a comment
There was a problem hiding this comment.
Looks good, works as described and makes sense 🎉
This was referenced Sep 30, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prerequisites
Fixes: #16368
Description
Currently the regular expression pattern field allows entry of any length of text. On SQL Server, the limit is 255 characters, so you'll get an exception thrown if you try to enter a longer pattern. With SQLite, the longer text is accepted, but then errors will occur if you deploy to an environment running SQL Server.
This PR adds a
maxlengthattribute to the field to prevent entry of a value that's too long.I've also increased the height of the box slightly to better present longer patterns.
This resolves the issue for Umbraco 13. Will check and if necessary create a separate PR for the same on Umbraco 15.