Add inline validation for preset fields with regex pattern#11925
Open
Shyam-123pandey wants to merge 4 commits intoopenstreetmap:developfrom
Open
Add inline validation for preset fields with regex pattern#11925Shyam-123pandey wants to merge 4 commits intoopenstreetmap:developfrom
Shyam-123pandey wants to merge 4 commits intoopenstreetmap:developfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds inline, non-blocking validation feedback for text inputs whose preset field definition includes a regex pattern, improving UX by showing/hiding a message as the user types.
Changes:
- Add a validation message element to
uiFieldText’s DOM structure. - Validate input values against
field.patternduringchange()and toggle the message visibility/text accordingly.
This comment was marked as spam.
This comment was marked as spam.
Author
|
Good After noon Sir, Almost things have been resolved just check , I have doubt on one issue as copilot suggested please check above, so suggest for that. |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
matkoniecz
reviewed
Feb 28, 2026
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
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.
Add inline validation for fields that define a regex pattern
Summary
This PR adds inline validation support for preset fields that define a
pattern(regex).If a field includes a regex pattern and the entered value does not match it, an informational message is displayed directly below the input field.
Behavior
pattern.Why
Some fields may define a regex pattern but currently provide no direct feedback when the value does not match the expected format.
This change improves UX by giving contextual, field-level feedback after editing is complete, while staying consistent with iD’s existing interaction model (no validation on every keystroke).
Scope
uiFieldText.Closes #10769