Quantcast
Channel: Fluent Validation for .NET
Viewing all articles
Browse latest Browse all 1917

New Post: Client-Side validation against abstraction

$
0
0
Hi,

let assume that I have a view that has a model:
@model Portal.Presentation.Models.IUserViewModel
and IUserViewModel:
  public interface IUserViewModel
    {
               
         string FirstName { get; set; }

    }
and its validator:
 public class UserValidator : AbstractValidator<IUserViewModel>
    {
        
        public UserValidator()
        {
            RuleFor(x => x.FirstName)
                .NotEmpty().Length(0, 50);
            
        }
        
    }
So the question is if Client-Side can be validated against abstraction?

Regards,
Leszek

Viewing all articles
Browse latest Browse all 1917

Trending Articles