Skip to content

docs: note that number fields accept Infinity - #10679

Merged
gonfunko merged 1 commit into
RaspberryPiFoundation:mainfrom
Anshmittal86:docs-number-infinity
Nov 12, 2026
Merged

gonfunko merged 1 commit into
RaspberryPiFoundation:mainfrom
Anshmittal86:docs-number-infinity

Conversation

@Anshmittal86

Copy link
Copy Markdown
Contributor

The basics

The details

Resolves

Fixes #4784

Proposed Changes

Adds a short note under the "Constraints" heading of the Number fields guide explaining that number fields accept Infinity/-Infinity (case-insensitive), and that setting min and max clamps infinite values to those limits.

Reason for Changes

Accepting infinity is the default behaviour but wasn't documented, which surprised developers expecting finite input (see #4784). Implements the docs change suggested by @zspriggs in the issue.

Test Coverage

Docs-only change. Checked the rendered Markdown in the GitHub preview, and verified the described behaviour against FieldNumber.doClassValidation_ in core/field_number.ts: "infinity" is matched case-insensitively and the value is clamped to min/max.

Documentation

This PR is the documentation update.

Additional Information

None.

@Anshmittal86
Anshmittal86 requested a review from a team as a code owner November 12, 2026 09:09
@github-actions github-actions Bot added the PR: docs Adds or updates documentation label Nov 12, 2026

@github-actions github-actions Bot left a comment

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.

Welcome! It looks like this is your first pull request in Blockly, so here are a couple of tips:

  • You can find tips about contributing to Blockly and how to validate your changes on our developer site.
  • We use conventional commits to make versioning the package easier. Make sure your commit message is in the proper format or learn how to fix it.
  • If any of the other checks on this PR fail, you can click on them to learn why. It might be that your change caused a test failure, or that you need to double-check the style guide.
    Thank you for opening this PR! A member of the Blockly team will review it soon.

@gonfunko

Copy link
Copy Markdown
Contributor

Thanks for the PR! This looks good to go.

@gonfunko
gonfunko merged commit bb2e192 into RaspberryPiFoundation:main Nov 12, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: docs Adds or updates documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Number fields accepting infinity is opaque

2 participants