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

New Post: Summarize all validation

Thanks for sharing this great library! I'm hoping to be able to summarize all of the validation messages that can be emitted by a validator without having to pass in an instance to validate. A...

View Article


New Post: Summarize all validation

Hi John FluentValidation isn't really designed to do this as the error messages are dynamically generated based on the state of the object. If you look at the default error messages then they contain...

View Article


New Post: Summarize all validation

Thanks Jeremy. While experimenting yesterday, I was starting to be able to replace the property name placeholders within the strings as follows (excuse the hacked together code): [Test] //this passes...

View Article

New Post: Summarize all validation

Yes, this will certainly work for simple cases. Internally I do something similar with FV's MVC integration (which requires the error messages to be generated up-front), but it does break down if...

View Article

New Post: FLUENT VALIDATOR ISSUE - SINGLETON vs WEBREQUEST

If windsor installs the validation assemblies as a singleton (.LifestyleSingleton), having an issue with the validator doing a datetime check. Validating a date using...

View Article


New Post: FLUENT VALIDATOR ISSUE - SINGLETON vs WEBREQUEST

Hi You should lazily evalulate the DateTime.Now by calling it from within a lambda: .LessThanOrEqual(x => DateTime.Now) Jeremy

View Article

New Post: SetValidator inside Custom abstract validation block

Is it possible to put a SetValidator inside Custom abstract validation. if so how What i'm trying to do is following Custom(model =>{ var outBuildingData = model.Data as IOutBuilding; var...

View Article

New Post: SetValidator inside Custom abstract validation block

This isn't supported I'm afraid.  SetValidator is used to assign a validator to a property as part of a rule chain. When you use Custom it bypasses this entirely. Personally I'd recommend avoiding the...

View Article


New Post: SL5 design mode failing

Both for Blend Preview for Silverlight 5 and VS designers fails at any RuleFor (but at runtime everything works perfectly): Method not found: 'System.Delegate...

View Article


New Post: change default error message for int/long

Is there a way to change the default error message for an in in FluentValidation? We are able to set up validations for more complex types but the simple 'the data you entered isn't an int' style...

View Article

New Post: change default error message for int/long

Hi All FlunentValidation's default error messages are overridable (see this page in the docs), however the message that you're seeing doesn't sound like it's coming from FluentValidation. Are you using...

View Article

New Post: SL5 design mode failing

Hi I'm afraid that FluentValidation doesn't have any design-time support built in, and this isn't currently something I'm planning on supporting (unless someone wants to submit a patch...). I'd suggest...

View Article

New Post: Nice to have things like ThrowOnAnyFailure

Nice library. Well, it will be better if we can write code like this to throw an exception: RuleFor(...).ThrowOnAnyFailure(string message); RuleFor(...).ThrowOnAnyFailure(MyExcxeption ex);...

View Article


New Comment on "Customising"

I think CascadeMode is not a good idea. Maybe methods/properties like And, Or, Not (even XOR) work better. See "Fluent Assertion" for a sample.

View Article

New Post: alternative for CascadeMode

CascadeMode may work perfrectly. But I think logic operators (Like And, Or, Not, Xor) should be easier to use and more descriptive. Fluent Assertion does a good job on this.

View Article


New Post: alternative for CascadeMode

Thanks for the suggestion, I'll take a look at how feasible this will be for a future release. Jeremy

View Article

New Post: Nice to have things like ThrowOnAnyFailure

This isn't something that I currently intend on adding to FluentValidation (mainly because the intended use for FV is to generate validation failure objects rather than throwing exceptions), but if you...

View Article


New Post: Fluent validation in case of 3 fields

Hi all, i have a problem when using FluentValidation. I have 3 field A, B, C; i want to check if A,B,C fields of an object are null or empty, raising error. So how it write? Please help me

View Article

Created Issue: FluentValidationModelValidatorProvider incompatible with MVC4...

In wanting to add in collection of FluentValidationModelValidatorProvider ModelValidatorProviders with MVC4, it generated an exception indicating that the type does not correponding to the type of the...

View Article

Commented Issue: FluentValidationModelValidatorProvider incompatible with...

In wanting to add in collection of FluentValidationModelValidatorProvider ModelValidatorProviders with MVC4, it generated an exception indicating that the type does not correponding to the type of the...

View Article
Browsing all 1917 articles
Browse latest View live