Skip to content

Improve notice message for Min/Max options for the Checkbox field #449

@rodica-andronache

Description

@rodica-andronache

Description

I think it's related to this issue #242

Reported by this user https://wordpress.org/support/topic/max-checked-option-not-working-2/, if you have a Checkbox field, and set some specific Min/Max options, when you try to add the Product in the Cart, when you are outside of the Min/Max options, you get the message "The field is a required field" instead of a more suggestive message like "You are allowed to choose only 1 option".

Step-by-step reproduction instructions

  1. Add a Checkbox field with two options A and B
  2. Set the Min and Max values to 1
  3. Attach the PPOM field to a product
  4. try to add the product in the cart, with both A and B selected
  5. You see the message "The field is required" instead of saying that you are not allowed to choose two options

Screenshots, screen recording, code snippet or Help Scout ticket

Image
Image

https://wordpress.org/support/topic/max-checked-option-not-working-2/

Environment info

No response

Is the issue you are reporting a regression

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis label could be used to identify issues that are caused by a defect in the product.customer reportIndicates the request came from a customer.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions