-
Notifications
You must be signed in to change notification settings - Fork 328
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
Text input ignoring 0 as value #4669
Labels
🐛 bug
Something isn't working the way it should (including incorrect wording in documentation)
nunjucks
text input
Milestone
Comments
dwp-dmitri-algazin
added
awaiting triage
Needs triaging by team
🐛 bug
Something isn't working the way it should (including incorrect wording in documentation)
labels
Jan 23, 2024
Uh oh! @dwp-dmitri-algazin, the image you shared is missing helpful alt text. Check your issue body. Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image. Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs. |
36degrees
added
nunjucks
text input
and removed
awaiting triage
Needs triaging by team
labels
Jan 23, 2024
patrickpatrickpatrick
moved this from Needs review 🔍
to In progress 📝
in GOV.UK Design System cycle board
Apr 11, 2024
patrickpatrickpatrick
added a commit
that referenced
this issue
May 2, 2024
Fixes #4669. Input component now uses govukAttributes macro to validate and format attributes. Test and example added for edge case outlined in issue #4669. Co-authored-by: Colin Rotherham <[email protected]>
patrickpatrickpatrick
added a commit
that referenced
this issue
May 2, 2024
Fixes #4669. Input component now uses govukAttributes macro to validate and format attributes. Test and example added for edge case outlined in issue #4669. Co-authored-by: Colin Rotherham <[email protected]>
patrickpatrickpatrick
added a commit
that referenced
this issue
May 2, 2024
Fixes #4669. Input component now uses govukAttributes macro to validate and format attributes. Test and example added for edge case outlined in issue #4669. Co-authored-by: Colin Rotherham <[email protected]>
patrickpatrickpatrick
added a commit
that referenced
this issue
May 7, 2024
Fixes #4669. Input component now uses govukAttributes macro to validate and format attributes. Test and example added for edge case outlined in issue #4669. Co-authored-by: Colin Rotherham <[email protected]>
patrickpatrickpatrick
moved this from In progress 📝
to Needs review 🔍
in GOV.UK Design System cycle board
May 7, 2024
patrickpatrickpatrick
added a commit
that referenced
this issue
May 9, 2024
Fixes #4669. Input component now uses govukAttributes macro to validate and format attributes. Test and example added for edge case outlined in issue #4669. Co-authored-by: Colin Rotherham <[email protected]>
patrickpatrickpatrick
added a commit
that referenced
this issue
May 9, 2024
Fixes #4669. Input component now uses govukAttributes macro to validate and format attributes. Test and example added for edge case outlined in issue #4669. Co-authored-by: Colin Rotherham <[email protected]>
36degrees
moved this from Done 🏁
to Ready to release 🚀
in GOV.UK Design System cycle board
May 9, 2024
36degrees
pushed a commit
that referenced
this issue
May 15, 2024
Fixes #4669. Input component now uses govukAttributes macro to validate and format attributes. Test and example added for edge case outlined in issue #4669. Co-authored-by: Colin Rotherham <[email protected]>
36degrees
moved this from Ready to release 🚀
to Done 🏁
in GOV.UK Design System cycle board
May 17, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
🐛 bug
Something isn't working the way it should (including incorrect wording in documentation)
nunjucks
text input
Description of the issue
If 0 (zero) is a valid field value, govukInput() ignores it, because of this if condition:
govuk-frontend/packages/govuk-frontend/src/govuk/components/input/template.njk
Line 52 in 87d7633
As we know from JavaScript, if ( 0 ) returns false, not true
Steps to reproduce the issue
Create govukInput with 0 value
Actual vs expected behaviour
I would expect to see mu input with value 0 in it
Environment (where applicable)
we use DWP Casa framework with latest GOV.UK Frontend Version: 5.0.0
when zero is a number ( 0 )
when zero is a string ( '0' )
The text was updated successfully, but these errors were encountered: