Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FluentValidation
Message
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
FluentValidation
Versions des environnements
Environment:
ASP.NET
OS:
Windows 7
Network:
Windows 2008 Server
Database:
DB2
Application:
Web
Divers
Thread ID:
01621036
Message ID:
01621036
Vues:
68
I was referred to using FluentValidation for use in MVC5 C# ASP.NET. I am trying to compare a field to two other fields but am getting an error.

The code in my customized "AbstractValidator" is the following :
RuleFor(x => x.Length).LessThanOrEqualTo(y => y.LengthMax)
   .GreaterThanOrEqualTo(z => z.LengthMin);
And when the view tried to render the control for the "Length" field using EditFor() this error displays...

Additional information: Validation type names in unobtrusive client validation rules must be unique. The following validation type was seen more than once: range

How should one go about comparing one value to two other values of the same model.
Répondre
Fil
Voir

Click here to load this message in the networking platform