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

New Post: FluentValidation StructureMap and DbContext (Entity framework)

This is the behaviour I'd expect to see.If the validators are signletons, and the dbcontext is per request, then having a singleton instance depend on a request-scoped instance will cause you problems....

View Article


New Post: Property validation after everything else valid

Not really - probably simpler to keep this check external to the main validator and only run it if validation succeeds.Jeremy

View Article


Closed Issue: Validation rules are not triggered [7117]

Hello,this is my code I have setup:public class ReleaseViewModelValidator : AbstractValidator<ReleaseViewModel>{ public ReleaseViewModelValidator(){ RuleFor(r => r.Name).NotEmpty().Length(1,...

View Article

New Post: Client side validations not working on IE 8

I am working with Fluent Validation, with MVC3, it is working fine while I am working with IE9, Chrome and Firefox, but as soon as I switch to IE 8, validations at client stop working.Any thoughts on it?

View Article

New Post: Client side validations not working on IE 8

Are the validation attributes being emitted into the generated markup? Does the browser show any script errors? 

View Article


New Post: Client side validations not working on IE 8

The validation attributes are showing like "data-val-required" and browser is not showing errors.

View Article

New Post: Client side validations not working on IE 8

Do you definitely have the correct script files referenced? And does the same problem occur if you use DataAnnotations instead of FluentValidation?

View Article

New Post: Adding Info to Message when using SetValidator on child Entity

Hello,when reusing a validator like here: public EventValidator() { var beneficiaryValidator = new BeneficiaryValidator(); RuleFor(event => event.Beneficiary) .SetValidator(beneficiaryValidator)...

View Article


New Post: Adding Info to Message when using SetValidator on child Entity

I'm afraid that this isn't something that FluentValidation supports. The only way around this would be to declare all the rules in-line rather than making use of a child validator (eg RuleFor(x =>...

View Article


New Post: Adding Info to Message when using SetValidator on child Entity

Yes we went with the way around you say but it could be a useful feature to add.We often needed it at our workplace in the past year.Anyway thank you for the good job, Matteo

View Article

New Post: Client side validations not working on IE 8

Sorry for wasting your time. It was actually my mistake. I didn't have updated some JQuery files, as soon as I updated them this was resolved.Thank you very much JeremyS.

View Article

New Post: fluentvalidation rulefor from xml file

Hi, I want to add the "Rulefor" objects from the xml file. means the rules are in the xml file and now how can i use the xml file to validate?

View Article

New Post: fluentvalidation rulefor from xml file

HiThis is not supported. The entire purpose of FluentValidation is to define rules in code.Jeremy

View Article


New Post: Strange behavior?

Hi, I'm using this excellent validation in an MVC application. I have two model classes "Translation" and "TranslationCategory". They both have a custom validator class "TranslationValidator" and...

View Article

New Post: Strange behavior?

If you're using the MVC integration then this is expected.MVC's model binding process will recursively check each property whether it has a validator defined for the type, so when it gets to the...

View Article


New Post: Strange behavior?

Hi Jeremy, Thanks for the reply. Is there some kind of workaround for this problem? Because the way it is now, I can either not use the "Category" class/model as a property of my "Translations" Class...

View Article

New Post: Strange behavior?

I'm not sure this is something that you can easily work around...by decorating the TranslationCategory with the ValidatorAttribute you're essentially telling MVC "please automatically validate all...

View Article


New Post: Fake it easy with Fluent Validation

Hi, I am trying to use fake it easy to mock the fluent validation call. But as the Validate method in the FLuent Validation has parameters with default values the lambda expression fails.A.CallTo(()...

View Article

New Post: CustomizeValidator

Can i use CustomizeValidator attribute on Web API? I tried using it and it doesnt seem to work

View Article

New Post: Strange behavior?

Hi Jeremy, I will try to work out a solution with a custom ModelValidatorProvider. Thanks for your help. David

View Article
Browsing all 1917 articles
Browse latest View live


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