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

Created Issue: Issues in ShouldHaveValidationErrorFor and...

We cannot use ShouldHaveValidationErrorFor and ShouldNotHaveValidationErrorFor methods for nested properties. For example, for tested class has a property of another class. For example, we cannot...

View Article


Edited Issue: Issues in ShouldHaveValidationErrorFor and...

We cannot use ShouldHaveValidationErrorFor and ShouldNotHaveValidationErrorFor methods for nested properties. For example, for tested class has a property of another class. For example, we cannot...

View Article


Commented Issue: Issues in ShouldHaveValidationErrorFor and...

We cannot use ShouldHaveValidationErrorFor and ShouldNotHaveValidationErrorFor methods for nested properties. For example, for tested class has a property of another class. For example, we cannot...

View Article

Commented Issue: Issues in ShouldHaveValidationErrorFor and...

We cannot use ShouldHaveValidationErrorFor and ShouldNotHaveValidationErrorFor methods for nested properties. For example, for tested class has a property of another class. For example, we cannot...

View Article

New Post: Checking for NULL in rules for nested properties

If you are using MVC integration you can implement IValidatorInterceptor. In BeforeMvcValidation you can check  validationContext.InstanceToValidate as YourModel).Header  If it is null you can create...

View Article


New Post: AppendArgument with PredicateValidator (Must)

Hello   Is it possible to append arguments when using Must rule (PredicateValidator)?   Ken

View Article

New Post: AppendArgument with PredicateValidator (Must)

Hi Ken I'm not entirely sure I understand what you mean. Could you provide more detail about what you're trying to achieve? If you're referring to using custom message arguments when using a Must rule,...

View Article

New Post: AppendArgument with PredicateValidator (Must)

Hi J Yes, I trying to use WithMessage("Value must be between {min} and {max}")   How do I provide the min and max argument? The predicate looks like: private static bool Calc(RegistrerSalgInput input,...

View Article


New Post: AppendArgument with PredicateValidator (Must)

Named parameters are defined explicitly by individual validators that know how to format them (for example, the Length validator knows what {min} and {max} mean - yhere's a list of which validators...

View Article


New Post: AppendArgument with PredicateValidator (Must)

Hi Well, thats not good enough for me. :-) I created my own PredicateValidator class (which takes the MessageFormatter in Predicate delegate), and created a Must extension method.  Thanks   Ken

View Article

New Post: AppendArgument with PredicateValidator (Must)

Hi Ken Please feel free to submit a pull request via github and I'll try and take a look at it over the next week. Thinking about it further, it may make more sense to modify this to receive the entire...

View Article

New Post: RuleSets with two abstract validators.

Hi! First of all thanks for a great library. I have an abstract validator which uses Rule sets. On of the rules looks like this: Inside myValidator: public class MyValidator :...

View Article

New Post: RuleSets with two abstract validators.

Hi  Rulesets are designed to cascade through to child validators - there isn't a way to change this behaviour out of the box. However, you could write your own IValidatorSelector implementation that...

View Article


New Post: RuleSets with two abstract validators.

Okay thx for the fast reply.

View Article

New Post: Rule sets on .ValidateAndThrow

I cant find a way to set a specific rule set on ValidateAndThrow as you can with: .Validate(businessAllocationDTO, ruleSet: "CustomValidation" ); is it possible?

View Article


New Post: Rule sets on .ValidateAndThrow

There isn't a built in method for this, but it'd be trivial to add an extension: public static class MyExtensions { public static void ValidateAndThrow(this IValidator validator, T instance, string...

View Article

New Post: AppendArgument with PredicateValidator (Must)

Done   Ken

View Article


Source code checked in, #4277168d99c0

Merge pull request #5 from ziaxdk/master Added PropertyValidatorContext to Must

View Article

Source code checked in, #8817f49cdd0c

Update changelog

View Article

New Post: AppendArgument with PredicateValidator (Must)

Applied - thanks. Jeremy

View Article
Browsing all 1917 articles
Browse latest View live


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