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

New Post: FluentValidation setting RuleFor in Validate instead of Constructor?

Hi I personally wouldn't use FluentValidation for this. FluentValidation is designed for situations where you know the rules that you need in advance - it isn't designed for situations where you're...

View Article


Commented Unassigned: MVC’s DefaultModelBinder does not Validate The Object...

I'm using package fluentvalidation.mvc 5 for asp.net mvc 5.1.2 (vs 2013) and followed this tutorial http://fluentvalidation.codeplex.com/wikipage?title=mvc&referringTitle=DocumentationNow I am...

View Article


New Post: Multi-Tenant Validation

Hi Patrick You'd need to define separate validator objects for each tenant (rather than having just 1 per model), and explicitly specify the custom messages in each of these validators that are...

View Article

Source code checked in, #363c67cf0faac73ac35ce35ba97d2165dfda8d84

Merge branch 'RuleForEach-Bugfix' of https://git01.codeplex.com/forks/tripolitov/fluentvalidation

View Article

Source code checked in, #ea7f58d75b089a333a48f94b6645431fe85847ba

Update changelog

View Article


New Post: Using NSubstitute is it possible to verify which ruleset was used...

Hi It depends on how you're calling the validator. How are you specifying the ruleset in your calling code? I have never used NSubstitute, so I can't help with that, but it should provide a way of...

View Article

New Post: Using NSubstitute is it possible to verify which ruleset was used...

Hi Jeremy Thanks for your response. I am calling the validator with ruleset in my code like this: var results = _userDtoValidator.Validate(userDto, ruleSet: Rulesets.UserOptOutOfEmails); where...

View Article

New Post: Using NSubstitute is it possible to verify which ruleset was used...

I would say that a lot of it depends on finding a balance that you're happy with. When I first started out with TDD, I went very over-board with testing the interactions - I had very high code-coverage...

View Article


New Post: How to by pass calling the InstanceCache?

Hi Jeremy: Thanks for the great reply that not only answer the question but also remind me of an important concept. J.

View Article


New Post: Project referenced FluentValidation build failed, please help.

Assembly generation failed -- Referenced assembly 'FluentValidation.Mvc' does not have a strong name Assembly generation failed -- Referenced assembly 'FluentValidation' does not have a strong name

View Article

New Post: Project referenced FluentValidation build failed, please help.

Default build of FluentValidation is not strong-named. Install the strong-named version instead. See the signed packages section on this page:...

View Article

New Post: Project referenced FluentValidation build failed, please help.

Thanks very much. I noticed the following instructions: Please be aware that signed packages are not recommended, and will not be supported long-term. I want to know why not recommended? Thanks.

View Article

New Post: Project referenced FluentValidation build failed, please help.

Strong naming doesn't really add any benefit, but makes dependency management more complex.

View Article


New Post: Localized message parameters

RuleFor(x => x.Password) .Length(1, 3).WithLocalizedMessage(()=> Demo.App_LocalResources.DataAnnotations.StringLength,new Object[] { "a", "b", "c" }); How can one make this work? The Length...

View Article

New Post: Localized message parameters

Not sure I understand your question. Additional parameters can be accessed from within the message using numeric placeholders (such as {0}, {1}, {2} etc - like a format string). Is this what you mean?

View Article


New Post: Localized message parameters

Actually I just wanted to use existing DataAnnotation resource files with Fluent Validation. Had those defined with multiple parameters{0},{1}...and in some cases I used tried to lambda expressions to...

View Article

New Post: WebAPI 2 & Autofac

Hi, Im developing an application using ASP.NET WebAPI 5.1.0 and Autofac 3.2, both latest releases. Im trying to integrate FluentValidation using Autofac but i can't make it work.Error:No scope with a...

View Article


New Post: WebAPI 2 & Autofac

Well.. after doing some tests i finally got it working :D. Pls find below the changes:# AutofacValidationModule // Old Code...

View Article

New Post: Cannot implicitly convert type 'IocValidatorFactory' to...

Hello, I am using FluentValidation 5.0.0.0 and FluentValidation MVC5 5.0.0.0 in an ASP.NET MVC 5.0.0 project and I have the...

View Article

New Post: Custom Validator Factory: Scan assembly instead of using...

Hi, Thought I'd share a custom Validator Factory that I've implemented for my site. Basically, I wasn't happy with the attribute approach (as neat as that is... ) as I didn't want my model classes to...

View Article
Browsing all 1917 articles
Browse latest View live


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