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

FluentNumberField with nullable value return validation error #2337

Closed
AlexNek opened this issue Jul 7, 2024 · 4 comments
Closed

FluentNumberField with nullable value return validation error #2337

AlexNek opened this issue Jul 7, 2024 · 4 comments
Labels
area:fluent-ui-web-components A FluentUI specific issue closed:duplicate Duplicate of another issue status:blocked Any issue blocked by another

Comments

@AlexNek
Copy link

AlexNek commented Jul 7, 2024

🐛 Bug Report

I have in EditForm

<DataAnnotationsValidator/>
<FluentValidationSummary class="text-danger" role="alert"/>
...
<FluentNumberField Name="Input.Abc" @bind-Value="Input.Abc" Step=0.5 Label="text" />
...
 private sealed class InputModel
 {
     public double? Abc { get; set; }
 }

💻 Repro or Code Sample

EidtForm with FluentNumberField and nullable value

🤔 Expected Behavior

Nothing to type and after pressing Submit button, I expected
No validation error for nullable types without attributes

User must see empty field and it is valid situation

😯 Current Behavior

Nothing to type and after pressing Submit button, I see
The value '' is not valid for 'Abc'.

The same error if I create my own validation attribute with Valid = true

🔦 Context

Edit form with optional numeric values

🌍 Your Environment

Windows, Google Chrome
.NET8 and Fluent UI Blazor library Version 4.*

@microsoft-github-policy-service microsoft-github-policy-service bot added the triage New issue. Needs to be looked at label Jul 7, 2024
@vnbaaij
Copy link
Collaborator

vnbaaij commented Jul 7, 2024

Hi,

The web component underlying our FluentNumberField is horribly broken. We can't fix that on our side.

I would advise you to not use that component regardless of whether if it works or not. See also my comment in #1127, and other issues around it in #1345 and others.

@vnbaaij vnbaaij added area:fluent-ui-web-components A FluentUI specific issue status:blocked Any issue blocked by another closed:duplicate Duplicate of another issue and removed triage New issue. Needs to be looked at labels Jul 7, 2024
@vnbaaij
Copy link
Collaborator

vnbaaij commented Jul 8, 2024

Your issue is already mention in #1345 as well, so closing this one as it is a duplicate

@vnbaaij vnbaaij closed this as not planned Won't fix, can't repro, duplicate, stale Jul 8, 2024
@AlexNek
Copy link
Author

AlexNek commented Jul 8, 2024

The web component underlying our FluentNumberField is horribly broken. We can't fix that on our side.

Could someone point this out in the documentation?
Here looks nice.

@vnbaaij
Copy link
Collaborator

vnbaaij commented Jul 8, 2024

Will do that. For the next release it will be:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:fluent-ui-web-components A FluentUI specific issue closed:duplicate Duplicate of another issue status:blocked Any issue blocked by another
Projects
None yet
Development

No branches or pull requests

2 participants