Comments (5)
Hi @ryanelian, I just wanted to weigh in and provide some context on the above. This happens because FV's ValidationResult.Errors
property was changed from an IList<ValidationFailure>
to List<ValidationFailure>
with the 10.0 release. The Accelist.FluentValidation.Blazor package doesn't currently contain an upper version limit for its FluentValidation dependency, so nuget will allow users to upgrade from FV 9 to 10 without warning them there's a compatibility issue.
The fix in this case is just to recompile against FV 10, but I'd also suggest patching the current release to add an upper version limit too.
I'd suggest the following:
- Create a 4.0.1 patch release that provides an upper version constraint limiting the FluentValidation dependency to versions >= 9.5.4 && < 10.0 with
<PackageReference Include="FluentValidation" Version="[9.5.4,10.0)" />
- Additionally create a 5.0.0 major release that updates to FluentValidation 10 and includes a constraint of >= 10.0.4 && < 11.0 with with
<PackageReference Include="FluentValidation" Version="[10.0.4,11.0)" />
Please feel free to ping me if you have questions about upgrading to 10.0
from fluentvalidation.blazor.
I made a fork to support FluentValidation 10.
I took the code from the version 5 branch and make the changes stated in this issue.
The idea is to make available an alternative (but compatible) nuget package until ryanelian can make an official release.
If you need FluentValidation 10 support check out https://github.com/pablopioli/FluentValidation.Blazor
from fluentvalidation.blazor.
@pablopioli You are a legend!!!
from fluentvalidation.blazor.
we have also facing the same issue when upgrade the FluentValidation 9.0.0 preview 3 to 9.0.0 preview 4. and present in latet version 10 also
`@using FluentValidation
<FluentValidator Validator="custVal"></FluentValidator>
<div class="form-group">
<label for="email">Email</label>
<InputText id="email" type="email" class="form-control" @bind-Value="Form.Email"></InputText>
<ValidationMessage For="() => Form.Email"></ValidationMessage>
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary">
<i class="fas fa-chevron-up"></i>
Submit
</button>
</div>
@code {
FormModel Form = new FormModel();
FormModelValidator custVal = new FormModelValidator();
public class FormModel
{
public string Email { set; get; }
}
public class FormModelValidator : AbstractValidator
{
public FormModelValidator()
{
RuleFor(Q => Q.Email).NotEmpty().EmailAddress().MaximumLength(255);
}
}
}
`
from fluentvalidation.blazor.
@JeremySkinner I want to thank you for helping here as well, your dedication is extremely appreciated
from fluentvalidation.blazor.
Related Issues (20)
- InputSelect not clearing message HOT 2
- OnFieldChanged not trigger HOT 1
- Consider using tags to version releases and use Github "releases" tab HOT 4
- How to do async validation HOT 6
- Library is not compatible with Client-Side Blazor due to Exception with async validation HOT 7
- Does not work with FluentValidation 9.x HOT 13
- International Date format yyyy-MM-dd error HOT 4
- Minor FluentValidation integration improvements HOT 1
- Validation messages are link to the first child object when using a list in the Model of the edit context HOT 5
- Silent errors misleading HOT 3
- Validation Message is not working for items inside a list HOT 1
- Nested objects are only validated when submitting the form HOT 2
- EditForm OnValidSubmit event is raised when validation failed using MustAsync() method. HOT 3
- How to trigger the validate method manually HOT 2
- Blazor WASM Project With Both Client & Server Validation HOT 1
- Async validation to server-side call HOT 2
- Suitable for Blazor webassembly? HOT 2
- Is this repo abandoned? HOT 2
- Async dispose results in null reference.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fluentvalidation.blazor.