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

New Post: Form Validation Failure Information

i have a question.      How can i tell to the user that some validtion of some property was done on the Form(View Control )?  I need in it for scenarion with one Validation Call for whole Page, that...

View Article


New Post: bool must be true doesn't translate to unobtrusive JS

Alright, thanks for the confirmation. I'll look into an alternative way.

View Article


New Comment on "mvc"

A quick note on how to add a custom validator to the configuration would be neat. This don't work!: FluentValidationModelValidatorProvider.Configure(x => x.Add(typeof(CheckedValidator), null));

View Article

New Post: Form Validation Failure Information

Hi FluentValidation itself is completely agnostic of the type of presentation technology that you're using (eg WebForms, MVC, WPF or whatever), so it has no way of knowing what view/usercontrol...

View Article

New Post: Greater than or equals comparison against an enum with Fluent...

I've asked this question on Stack Overflow, but haven't had much luck getting an answer so I thought I'd try here.  How can I do a conditional comparison against an enum and trigger rules based upon...

View Article


New Post: Greater than or equals comparison against an enum with Fluent...

Hi The error you're seeing ("The validator 'FirstValidator' cannot validate members of type 'MyEnum' - the types are not compatible") is because by using SetValidator you're trying to validate the...

View Article

New Post: Greater than or equals comparison against an enum with Fluent...

Thanks for the quick response Jeremy.  This is what I'm looking for, but I'm still getting issues with trying to implement your suggestion. I'm looking to apply the same condition to multiple rules, so...

View Article

New Post: Greater than or equals comparison against an enum with Fluent...

Could you post the code that's giving you the error? Thanks.

View Article


New Post: Greater than or equals comparison against an enum with Fluent...

Here's a sample app with your suggestion which returns the following error msg: The type arguments for method...

View Article


New Post: Greater than or equals comparison against an enum with Fluent...

The problem here is you're not calling the correct method. You're calling DefaultValidatorOptions.When - you should be calling just When (which is defined on AbstractValidator itself) Jeremy Skinner...

View Article

Updated Wiki: Customising

Overriding the Default Error You can override the default error message for a validator by calling the WithMessage method on a validator definition: RuleFor(customer =>...

View Article

Image may be NSFW.
Clik here to view.

Updated Wiki: Home

Project DescriptionA small validation library for .NET that uses a fluent interface and lambda expressions for building validation rules for your business objects. If you find FluentValidation useful,...

View Article

Image may be NSFW.
Clik here to view.

Updated Wiki: Home

Project DescriptionA small validation library for .NET that uses a fluent interface and lambda expressions for building validation rules for your business objects. If you find FluentValidation useful,...

View Article


New Post: Greater than or equals comparison against an enum with Fluent...

My apologies, once you noted that, I upgraded to the latest version of fluent validation and it resolved the problem. Thanks again for your help

View Article

New Post: Form Validation Failure Information

thank's  Jeremy for reply.    i understand such fact..          i beleave i'll do some extensions by myself for it.      

View Article


New Post: is it possible to not use split in name

Hi there, any chance this functionality has been updated since the previous post? It would be nice to be able to override this on a global level, perhaps similar to the PropertyNameResolver type...

View Article

New Post: is it possible to not use split in name

...and it would be the "DisplayNameResolver" !! thanks again!

View Article


New Post: WithLocalizedMessage overload with instance of type being validated?

Hi, I have cases where I need to build the errormessage based on values inside the type being validated. eg.  RuleFor(f=>f.FirstName) .NotEmpty() .WithLocalizedMessage((x) =>...

View Article

New Post: WithLocalizedMessage overload with instance of type being validated?

Yes, this is indeed possible. There's a separate overload of WithLocalizedMessage that you can use. The first argument must always point to the resource, then subsequent arguments can be expressions...

View Article

New Post: WithLocalizedMessage overload with instance of type being validated?

Oh yeah I should've known that the expression is per parameter. Thanks a bunch for creating this library and providing spotless support for it!

View Article
Browsing all 1917 articles
Browse latest View live


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