Skip to content
Permalink
786f504d13
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
65 lines (50 sloc) 1.98 KB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
namespace TeamDBAwesome.Models
{
public class Employee
{
//alpha upper and lowercase, spaces, dots and dashes from 2 to 20 chars
[RegularExpression(@"^([A-Za-z\s\.-]{2,20})$")]
public string FName;
//alpha upper and lowercase, spaces, dots and dashes from 2 to 20 chars
[RegularExpression(@"^([A-Za-z\s\.-]{2,20})$")]
public string LName;
//alpha upper and lowercase, spaces, dots, dashes, numbers, colons, pounds and commas from 2 to 70 chars
[RegularExpression(@"^([A-z\s\-\d\.\#\:\,]{2,70})$")]
public string Address;
//alpha upper and lowercase, spaces, dots and dashes from 2 to 40 chars
[RegularExpression(@"^([A-Za-z\s\.-]{2,40})$")]
public string City;
//alpha upper and lowercase, spaces, dots and dashes from 2 to 40 chars
[RegularExpression(@"^([A-Za-z\s\.-]{2,40})$")]
public string State;
//5-15 digit long numbers
[RegularExpression(@"^(\d{5,15})$")]
public string Post;
//alpha upper and lowercase, spaces, dots and dashes from 2 to 40 chars
[RegularExpression(@"^([A-Za-z\s\.-]{2,40})$")]
public string Country;
//match a 10-15 digit long number
[RegularExpression(@"^(\d{10,15})$")]
public string Phone;
//match a 10-15 digit long number
[RegularExpression(@"^(\d{10,15})$")]
public string Fax;
//an Email Address
[EmailAddress]
public string Email;
//alpha upper and lowercase, spaces, dots and dashes from 2 to 80 chars
[RegularExpression(@"^([A-Za-z\s\.-]{2,30})$")]
public string Title;
public DateTime BirthDate;
public DateTime HireDate;
//both of these are just ints
public int ReportsTo;
public int PersonID;
public int EmployeeID;
}
}