Depends on where you are doing it.
If the validation is server side:
List<string> list = new List<string>();
public void RunSnippet()
{
Add("abc");
Add("abd");
Add("abc");
}
void Add(string s)
{
if (list.Contains(s))
Console.WriteLine("Exists :" + s);
else
{
list.Add(s);
Console.WriteLine(s);
}
}
Will report that "abc" exists the second time.
Remember that you will want these to be case insensitive comparisions!