Top "Fluentvalidation" questions

Fluent Validation is an ASP.

Fluent Validation vs. Data Annotations

What are the operative differences between these two validation packages when used for ASP.NET MVC validatation? They seem to …

.net asp.net-mvc data-annotations fluentvalidation
FluentValidation rule for null object

I've been trying to work out how to create a FluentValidation rule that checks if the instance of an object …

c# fluentvalidation
FluentValidation multiple validators

Can I add more than one validator to an object? For example: public interface IFoo { int Id { get; set; } string …

c# .net fluentvalidation
Child Model Validation using Parent Model Values. Fluent Validation. MVC4

Below is a simplified version of my problem. I can not flatten the model. There is a List of "children" …

c# asp.net-mvc validation asp.net-mvc-4 fluentvalidation
How can I access the collection item being validated when using RuleForEach?

I'm using FluentValidation to validate an object, and because this object has a collection member I'm trying to use RuleForEach. …

c# validation fluentvalidation
FluentValidation string NotNull versus NotEmpty

Originally when writing validation logic for strings I settled on using NotEmpty for any string that was required. When using .…

c# .net string validation fluentvalidation
Fluent validation: set custom message on custom validation

Scenario I have a custom rule to validate the shipping cost of an order: public class OrderValidator : BaseValidator<Order&…

c# fluentvalidation custom-errors
FluentValidation - validating across multiple properties

Have a form where a user can enter start date/time and end date/time for an event. Here's the …

asp.net-mvc-3 fluentvalidation
Add validation to a MediatR behavior pipeline?

I'm using ASP.NET Core, the built-in container, and MediatR 3 which supports "behavior" pipelines: public class MyRequest : IRequest<string&…

c# asp.net-core cqrs fluentvalidation mediatr
How do you validate against each string in a list using Fluent Validation?

I have an MVC3 view model defined as: [Validator(typeof(AccountsValidator))] public class AccountViewModel { public List<string> Accounts { …

c# asp.net-mvc-3 fluentvalidation