Add inline validation for preset fields with regex pattern#11925
Closed
Shyam-123pandey wants to merge 4 commits intoopenstreetmap:developfrom
Closed
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.
Contributor
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 comment was marked as off-topic.
This comment was marked as off-topic.
Member
|
While in general, it is probably worth exploring the options to show such validation warnings inline with the fields, the particular implementation does not seem to be very well thought through / matching the rest of our UI/UX patterns. Closing until we have a better idea how we want to approach this in general |
Contributor
Author
|
Okay thanks, if any you'll find please suggest, I am working on it if found
any strong idea which meets required criterias, inform to you.
Thanks & Regards
Shyam pandey
…On Thu, 19 Mar 2026, 4:34 pm Martin Raifer, ***@***.***> wrote:
*tyrasd* left a comment (openstreetmap/iD#11925)
<#11925 (comment)>
While in general, it is probably worth exploring the options to show such
validation warnings inline with the fields, the particular implementation
does not seem to be very well thought through / matching the rest of our
UI/UX patterns.
Closing until we have a better idea how we want to approach this in general
—
Reply to this email directly, view it on GitHub
<#11925 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BFALIIVU6YLECOVN2YS4U4T4RPH47AVCNFSM6AAAAACV7FSNKGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DAOBZGM2TCNRSGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
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