Skip to content
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

Validation not working (Umbraco.RadioButtonList, Toggle) #18268

Closed
croban opened this issue Feb 7, 2025 · 4 comments · Fixed by #18629
Closed

Validation not working (Umbraco.RadioButtonList, Toggle) #18268

croban opened this issue Feb 7, 2025 · 4 comments · Fixed by #18629

Comments

@croban
Copy link

croban commented Feb 7, 2025

Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)

15.3.2

Bug summary

Validation does not work with Umbraco.RadioButtonList or Toggle.
I could save the document type.

Image

Umbraco version 15.3.2

Specifics

No response

Steps to reproduce

really?

Expected result / actual result

No response


This item has been added to our backlog AB#48880

@croban croban added the type/bug label Feb 7, 2025
Copy link

github-actions bot commented Feb 7, 2025

Hi there @croban!

Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better.

We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.

  • We'll assess whether this issue relates to something that has already been fixed in a later version of the release that it has been raised for.
  • If it's a bug, is it related to a release that we are actively supporting or is it related to a release that's in the end-of-life or security-only phase?
  • We'll replicate the issue to ensure that the problem is as described.
  • We'll decide whether the behavior is an issue or if the behavior is intended.

We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions.

Thanks, from your friendly Umbraco GitHub bot 🤖 🙂

@croban croban changed the title Validation not working Validation not working (Umbraco.RadioButtonList, Toggle) Feb 7, 2025
@NguyenThuyLan
Copy link
Contributor

Thanks, @croban , I was able to reproduce it on v15.2.0 (15.3.0-rc.preview.79).
However, I don't think the Toggle property has an error on it since when it is not enabled, it will have a false value

@croban
Copy link
Author

croban commented Feb 10, 2025

@NguyenThuyLan thx,

Yes, this is more of a philosophical question 😊. In my view, a radio button list essentially has three possible states:

  • true (selected),
  • false (not selected), and
  • undefined/null (no selection made by the user).

Similarly, in the case of a toggle switch, the "initial state" is unchecked.

Image

In some scenarios, you may want to ensure that users consciously make a selection (required) rather than leaving it undefined.
This is how I believe it should work—but of course, I could be wrong.

br

@nielslyngsoe nielslyngsoe added the state/sprint-candidate We're trying to get this in a sprint at HQ in the next few weeks label Feb 10, 2025
@nielslyngsoe nielslyngsoe self-assigned this Feb 10, 2025
@nielslyngsoe
Copy link
Member

Hi @croban intersting thoughts on the Mandatory aspect.

I would say that a Mandatory Property would require the Toggle to be set to true.

Cause the alternative would be a undefined state (as you describe), which we should represent in the UI, so it does not become a secret state that developers understand — in other words we would need to make it clear to the user that they haven't made a choice. But this then changes how it has worked previously, so to avoid moving any cheese(breaking things) it should only hold false or true value.

But if you bring a good case for the three state approach we could make it possible. Maybe a new Property Editor, technically the name could be NullableToggle? Also notice how such toggle should be able to be unset to go back to the undefined/null state — such could properly be okay to only achieve via a Property Action.

:-)

@croban croban closed this as completed Feb 27, 2025
leekelleher added a commit that referenced this issue Mar 10, 2025
Fixes #18268
@iOvergaard iOvergaard added release/15.4.0 and removed state/sprint-candidate We're trying to get this in a sprint at HQ in the next few weeks state/reproduced labels Mar 11, 2025
iOvergaard pushed a commit that referenced this issue Mar 11, 2025

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
Fixes #18268
@leekelleher leekelleher removed their assignment Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants