If the built in attributes are not sufficient to validate your model data, then you can place your validation logic in a class derived from ValidationAttribute. In this example only odd numbers are valid values for a model member.
Custom Validation Attribute
public class OddNumberAttribute : Valid...