Megabit / Blazorise

Blazorise is a component library built on top of Blazor with support for CSS frameworks like Bootstrap, Tailwind, Bulma, AntDesign, and Material.
https://blazorise.com/
Other
3.26k stars 526 forks source link

[Bug]: Validator dateTime #5690

Closed danik121 closed 3 weeks ago

danik121 commented 4 weeks ago

Blazorise Version

1.6

What Blazorise provider are you running on?

FluentUI2

Steps to reproduce

<Field>
   <FieldLabel RequiredIndicator>Date</FieldLabel>
   <FieldBody>
     <Validation Validator="@ValidationRule.IsDateSelected<DateTime?>">
       <DatePicker TValue="DateTime?" DisplayFormat="dd/MM/yyyy" @bind-Date="@Date">
       </DatePicker>
     </Validation>
   </FieldBody>
 </Field>

What is expected?

No errors

What is actually happening?

RZ9986 Component attributes do not support complex content (mixed C# and markup). Attribute: 'Validator', text: 'ValidationRule.IsDateSelected<DateTime?>'

What browsers do you see the problem on?

No response

Any additional comments?

No response

stsrki commented 4 weeks ago

It seems I have accidentally created and pushed those new APIs without fully testing them. I wanted to experiment a little and somehow they got through.

😗 I think I will need to remove them from this 1.6.


As an alternative, I advise creating a new method to validate dates.

danik121 commented 4 weeks ago

@stsrki I have already used my own

stsrki commented 4 weeks ago

Thank you for reporting it. And, sorry for the inconvenience.