Click here to Skip to main content
15,306,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I want to use
[StringLengthValidator(1, 10, MessageTemplate = "ZipCode Invalid Length")]
I have also added those Libraries

using Microsoft.Practices.EnterpriseLibrary.Common;
using Microsoft.Practices.EnterpriseLibrary.Common.Configuration;
using Microsoft.Practices.EnterpriseLibrary.Validation;
using Microsoft.Practices.EnterpriseLibrary.Validation.Validators;

But Still I am not able to use it.Its not comming its showing

using Microsoft.Practices.EnterpriseLibrary.Validation.Validators.StringLengthValidator is not an attribute class

So Can U please guide me.



1 solution

Please add reference of System.ComponentModel.DataAnnotations.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900