Skip to content

Fix DF 529: location cosmetics#260

Merged
mokhld merged 5 commits intomainfrom
fix-df-529-location-cosmetics
Nov 20, 2025
Merged

Fix DF 529: location cosmetics#260
mokhld merged 5 commits intomainfrom
fix-df-529-location-cosmetics

Conversation

@mokhld
Copy link
Copy Markdown
Contributor

@mokhld mokhld commented Nov 20, 2025

Proposed change

Jira ticket:

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Misc. (documentation, build updates, etc)

Checklist

  • You have executed this code locally and it performs as expected.
  • You have added tests to verify your code works.
  • You have added code comments and JSDoc, where appropriate.
  • There is no commented-out code.
  • You have added developer docs in README.md and docs/* (where appropriate, e.g. new features).
  • The tests are passing (npm run test).
  • The linting checks are passing (npm run lint).
  • The code has been formatted (npm run format).

content: none;
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this doesn't have an impact on other components?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not that I can find. This only targets nested form groups because regular form fields don't use nested form groups. This is specifically needed for the location field components because we're wrapping the text field inside another form group for the proper error styling. It's a strange one.

return {
pattern,
patternErrorMessage: `Enter a valid National Grid field number for ${lowerFirst(this.label)} like NG 1234 5678`
patternErrorMessage: `Enter a valid National Grid field number for {{#title}} like NG 1234 5678`,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we stripping spaces or insisting on spaces? Or allowing with/without spaces?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We haven't changed the spaces at all. It still supports both formats. It only changes the error message template syntax for consistency.

Copy link
Copy Markdown
Contributor

@jbarnsley10 jbarnsley10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great. A few questions (but probably no changes required). Approving in principal of you getting the tests working

@sonarqubecloud
Copy link
Copy Markdown

@mokhld mokhld marked this pull request as ready for review November 20, 2025 16:26
@mokhld mokhld merged commit 2ff3fb6 into main Nov 20, 2025
26 checks passed
@mokhld mokhld deleted the fix-df-529-location-cosmetics branch November 20, 2025 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants