1
Vote

How to configure a custom ValidationAttribute?

description

I have created a couple of custom ValidationAttributes, but if I use then in the standard Data Annotations manner along with using the ModelMetadataConfiguration they do not fire. Is it possible to do this?

comments

kazimanzurrashid wrote Oct 17, 2010 at 4:58 AM

Post some so that I can take a look.

posthope wrote Oct 17, 2010 at 6:46 PM

One is to simply check for the Min Length of a String (for password creation). The others are the need to check for uniqueness in the database similar to the alias in Shrinkr. I noticed in Shrinkr you did not use ModelMetadataConfiguration on your ViewModels so I could not find solution in your code. Any help would be great.