What about:
RuleFor(m => new {m.CountyId, m.Zip}).Must(x => ValidZipCounty(x.Zip, x.CountyId))
.WithMessage("Wrong Zip County");
More Related Contents:
- Should I abstract the validation framework from Domain layer?
- ViewModel validation for a List
- GlobalConfiguration.Configure() not present after Web API 2 and .NET 4.5.1 migration
- Why doesn’t Dictionary have AddRange?
- Application_Start not firing?
- How do I default Visual Studio to C# projects instead of VB.NET?
- C# unsupported grant type when calling web api
- Best way to change dictionary key
- using static Regex.IsMatch vs creating an instance of Regex
- How to expose a collection property? [closed]
- Problem using SQLite :memory: with NHibernate
- Can you make an alpha transparent PNG with C#?
- IsAssignableFrom() returns false when it should return true
- Basic render 3D perspective projection onto 2D screen with camera (without opengl)
- Transform IEnumerable asynchronously by awaiting each task
- Can OWIN middleware use the http session?
- How can I force a log out of all users for a website?
- Sockets On Same Machine For Windows and Linux
- Await and SynchronizationContext in a managed component hosted by an unmanaged app
- How to wrap a method via attributes?
- c# WebRequest using WebBrowser cookie
- Why does Math.Exp give different results between 32-bit and 64-bit, with same input, same hardware
- How should I access a computed column in Entity Framework Code First?
- Winform form closed event
- Unable to resolve service for type ‘Microsoft.AspNetCore.Identity.UserManager` while attempting to activate ‘AuthController’
- ASP.NET Core configuration for .NET Core console application
- ‘const string’ vs. ‘static readonly string’ in C# [duplicate]
- How to check if all list items have the same value and return it, or return an “otherValue” if they don’t?
- IIS Request.UserHostAddress returning IPV6 (::1), even when IPV6 disabled
- Error: “There was an error running the selected code generator: Package restore failed”