Quantcast
Channel: Fluent Validation for .NET
Browsing all 1917 articles
Browse latest View live

New Post: FluentValidation: RuleSet unit testing

Hi Jeremy, Thanks for the great work done. Am new to Fluent Validation testing. I've been looking for a way of unit testing a particular RuleSet of a validator. Is this possible at all? Example...

View Article


New Post: Clean up post and validating ViewModel to convert to Domain...

Hello Guys, I have some questions about how is the best way to use fluent validation with best pratices of asp.net mvc. Actually, I would like to know, how have you been using Fluent Validation. I...

View Article


New Post: Client Validation - When Clause

Just found this. It would be helpful if the documentation had a note about this in the Specifying a condition with When/Unless section.

View Article

New Post: Client Validation - When Clause

The MVC documentation states the following... Note that FluentValidation will also work with ASP.NET MVC's client-side validation, but not all rules are supported. For example, any rules defined using...

View Article

Reviewed: 3.3 (May 12, 2012)

Rated 5 Stars (out of 5) - Absolutely great job. It is so fluent. Keep on the good job.

View Article


New Post: Clean up post and validating ViewModel to convert to Domain...

Hi FluentValidation is designed to validate viewmodel/inputmodel objects. Personally, I don't consider it valuable to have a domain model and a view model where the two are almost identical (like in...

View Article

New Post: Re-using Validators for Complex Properties cannot specify WithMessage

When I set a validator on a complex property the message I set in the parent validator is ignored:   RuleFor(issuer => issuer.Location) .SetValidator(new LocationValidator()) .WithMessage("Wrong...

View Article

New Post: Re-using Validators for Complex Properties cannot specify WithMessage

Hi This isn't supported I'm afraid - when using a nested validator for complex properties the error messages always come from the nested validator. Jeremy

View Article


New Post: Entity Validation Result Extension

I'm attempting to adapt fluentvalidation (3.3) to work with our current Entity validation. An Entity has a collection of type "ValidationResult" associated with it.   public class Entity { . ....

View Article


New Post: Clean up post and validating ViewModel to convert to Domain...

Hi Jeremy, thanks for the awser. In my case, for sample, I have a property (Code property) that have to be unique for each product, like an ID. On my View, this field will the a textbox. I think it's a...

View Article

New Post: Entity Validation Result Extension

Nevermind... arg...  Here is the solution I went with in case anyone is interested. I was able to use the "WithState" extension to add a custom state object that contains the ValidationSeverity and...

View Article

New Post: Validating parent field against a field in a collection

I have the following class public class Person { public List<Person> Friends { get; set; } public string Email { get; set; } }I'd like to validate that the Person doesn't have the same email...

View Article

New Post: Collection validation is not letting WithMessage to show the custom...

Hi, I have a parent and associated child model like following :       Parent Model: [FluentValidation.Attributes.Validator(typeof(ParentValidator))] public class ParentModel { [DisplayName("Parent...

View Article


New Comment on "Customising"

How can we perform a cross object validations. For example, I have two business objects BlogGroup and User. Rule: A user with the same name cannot belong to bloggroup of type xyz. Name is an attribute...

View Article

New Post: Validating parent field against a field in a collection

Something like this will probably do it: RuleFor(x => x.Email).Must((email, person) => person.Friends.All(x => x.Email != email)); Jeremy

View Article


New Post: Clean up post and validating ViewModel to convert to Domain...

Personally, yes I would.

View Article

New Post: Collection validation is not letting WithMessage to show the custom...

Hi I'm afraid this isn't supported - when using child validators the error messages are always generated by the child validator, not the top level validator.  You'd need to set the messages inside the...

View Article


New Post: How to use it with Windows Phone 7.1?

I'll do that the next time I push out a new release.

View Article

New Post: How to use it with Windows Phone 7.1?

Thanks

View Article

New Post: Cross Entity Validations

How can we perform a cross object validations. For example, I have two business objects BlogGroup and User. Rule: A user with the same name cannot belong to bloggroup of type xyz. Name is an attribute...

View Article
Browsing all 1917 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>