This project is read-only.

How to configure a custom ValidationAttribute?


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?


kazimanzurrashid wrote Oct 17, 2010 at 5:58 AM

Post some so that I can take a look.

posthope wrote Oct 17, 2010 at 7: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.