AdvancedCustomFields / AdvancedCustomFields/acf
Validation of field number
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 945
- Forks
- 197
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
Validation of the number field does not work if we use it in a acf gutenberg block. It is about validating the maximum value of the field. Arrows work but I can enter any value and save.
To Reproduce
Steps to reproduce the behavior:
- Go to custom acf block with number field that has a set maximum value
- Click on number field and enter any value.
- Click save
- Validation did not catch the error and saved the post.
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots or Video
If applicable, add screenshots or video to help explain your problem.
Code
Please drag and drop an export of your field group, option page, custom post type or taxonomy JSON here.
If your issue relates to ACF Blocks, please also provide a reproducable code example of your ACF Block including it's block.json so we can reproduce the issue.
Version Information:
- WordPress Version 6.6.1
- PHP Version 8.2
- ACF VersionACF PRO 6.3.6
- Browser Chrome 128
Additional context
Add any other context about the problem here.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue in an ACF Gutenberg block with a number field configured with a maximum value, then test saving a value above that limit. The fix is complete when the block's save validation rejects out-of-range values instead of saving the post.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100