Comprehensive guide to all validation attributes available in EasyValidate
Date and time validation attributes
20 attributesMinimumAge(int)- The minimum age allowed (inclusive)MaximumAge(int)- The maximum age allowed (inclusive)Minimum(DateTime)- The minimum date allowed (inclusive)Maximum(DateTime)- The maximum date allowed (inclusive)Days(int[])- Array of allowed days of the month (1-31)Days(DayOfWeek[])- Array of allowed days of the weekMaximumAge(int)- The maximum age allowedMinimumAge(int)- The minimum age requiredMonths(int[])- Array of allowed months (1-12)Quarters(Quarter[])- Array of allowed quarters (Q1-Q4)Minimum(TimeSpan)- The minimum time allowed (inclusive)Maximum(TimeSpan)- The maximum time allowed (inclusive)Years(int[])- Array of allowed yearsCollection validation attributes
10 attributesExpectedValue(object)- The value that must be present in the collectionExpectedLength(uint)- The exact number of elements requiredMaximum(uint)- The maximum number of elements allowedMinimum(uint)- The minimum number of elements requiredForbiddenValue(object)- The value that must not be in the collectionExpectedValue(object)- The value that must appear exactly onceExpectedValue(object)- The value that must appear at most onceGeneral purpose validation attributes
5 attributesComparisonValue(object)- The value to compare againstComparisonValue(object)- The value that is not allowedNumeric validation attributes
17 attributesDivisor(double)- The value the number must be divisible byMaximum(int)- The maximum number of digits allowedMinimum(int)- The minimum number of digits requiredFactor(double)- The value the number must be a multiple ofBase(int)- The base value for power calculationBoundary(RangeBoundary)- Inclusive, Exclusive, InclusiveMinExclusiveMax, or ExclusiveMinInclusiveMaxString validation attributes
31 attributesEncodingType(BaseType)- The encoding type (Base16, Base32, Base58, Base62, Base64, Base85)Comparison(StringComparison)- Optional comparison type (default: OrdinalIgnoreCase)Comparison(StringComparison)- Optional comparison typeAllowedExtensions(string[])- Array of allowed extensionsMinimum(uint)- The minimum string length requiredComparison(StringComparison)- Optional comparison typeForbiddenValues(string[])- Array of forbidden valuesAllowedValues(string[])- Array of allowed valuesComparison(StringComparison)- Optional comparison typeEnumType(Type)- The enum type to validate againstCheck out comprehensive examples and real-world usage scenarios