Edited 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 ArticleCommented 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 ArticleNew Post: NullReferenceException using FluentValidation in MVC3
Jeremy,Did you receive the sample project email that I sent yesterday?PatFrom: JeremyS [email removed]Sent: Tuesday, November 06, 2012 9:31 AMTo: Patrick WoodallSubject: Re: NullReferenceException...
View ArticleNew Post: NullReferenceException using FluentValidation in MVC3
No, I'm afraid I still haven't received it. Perhaps you could upload it somewhere for me to download? Jeremy Skinner Sent from my iPhone
View ArticleNew Post: NullReferenceException using FluentValidation in MVC3
Are you not getting the email, or is the attachment being stripped off?Do you have a DropBox account? I could put it in a folder for you.From: JeremyS [email removed]Sent: Wednesday, November 07, 2012...
View ArticleNew Post: NullReferenceException using FluentValidation in MVC3
The email isn't coming through at all (not in my junk folder either). Yes, I have a Dropbox account - same as my email address. Jeremy SkinnerSent from my iPhone On 7 Nov 2012, at 18:38, pwoodall520...
View ArticleCommented 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 ArticleNew Post: NullReferenceException using FluentValidation in MVC3
I sent an invitation to the following email:Jeremy@jeremyskinner.co.ukI have placed the zip file in the folder. Let me know if you have any issues retrieving it.From: JeremyS [email removed]Sent:...
View ArticleNew Post: NullReferenceException using FluentValidation in MVC3
Got it - thanks.Looking at this, it appears the issue was fixed last month in a patch, however I haven't yet got round to doing a new deployment since then. If you download and build from source, then...
View ArticleCommented 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 ArticleNew Post: NullReferenceException using FluentValidation in MVC3
Thanks. Appreciate the quick feedback.When I get a chance I will download the source and do a build. Based on what I saw, the NuGet package install just references the libraries for the project. I take...
View ArticleNew Post: NullReferenceException using FluentValidation in MVC3
Yes, you just need to reference the FluentValidation and FluentValidation.Mvc assemblies. I'll get a new NuGet build pushed out soon, but it might not be this week.Jeremy
View ArticleCommented 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 ArticleNew Post: Nullable SelectedID of the DropDownList has always a TRUE...
Hello Jeremy,I am using a DropDownListFor and a nullable int as the SelectedId which I send to the controller.The ViewModel and the controller both have as parameter/property a nullable int. Thus the...
View ArticleNew Post: Nullable SelectedID of the DropDownList has always a TRUE...
My unit tests: [Test]publicvoid DeleteListReleaseViewModel_ReleaseIsNotSelected_ReturnsIsNotValid() {new DeleteReleaseListViewModelValidator().ShouldHaveValidationErrorFor(x => x.SelectedId,...
View ArticleNew Post: Nullable SelectedID of the DropDownList has always a TRUE...
Sounds like your validators are not being hooked up correctly. The fact that your test passes means that your validator is working, but if ModelState.IsValid is true, then this means the validator is...
View ArticleNew Post: Nullable SelectedID of the DropDownList has always a TRUE...
This time my Model is annotated correctly with the typeof(DeleteReleaseListViewModelValidator).I will put together a sample repro for you this weekend. Probably then I find the failure ;-)
View ArticleNew Post: Nullable SelectedID of the DropDownList has always a TRUE...
Hello Jeremy,sorry for the late reply. Have had no time to answer earlier.I have ripped my application to show only one delete releaseviewmodel dialog.It is still as I said at the beginning.1.) Using a...
View ArticleNew Post: Nullable SelectedID of the DropDownList has always a TRUE...
The method signature of your Delete method isn't correct - it should be: public ActionResult Delete(DeleteReleaseListViewModel model) ... not public ActionResult Delete(int? selectedId)...
View ArticleNew Post: Nullable SelectedID of the DropDownList has always a TRUE...
I agree. This problem I also had with the Data annotations.I need a model that the model can be validated...Thanks, then I will take my former approach wich worked and was correct then,...
View Article