using SrkToolkit.DataAnnotations;
Validates a CultureInfo
name.
[CultureInfo]
public string Culture { get; set; }
Validates a date range.
[DateRange(Minimum = "2014-01-01T00:00:00", Maximum = "2015-12-31T00:00:00")]
public DateTime Date { get; set; }
With .NET 4.5, use [EmailAddressEx]
.
Validates one or many email addresses.
// model definition
[EmailAddress]
public string Email { get; set; }
[EmailAddress(AllowMultiple = true, Maximum = 16)]
public string Emails { get; set; }
// get values from model
var email = Validate.EmailAddress(model.Email);
var emails = Validate.ManyEmailAddresses(model.Emails);
Validates a .NET timezone name.
[Timezone]
public string Timezone { get; set; }