User753101303 posted
Hi,
More likely the problem is that you are using var item in validateList.ToString() so more likely you iterate on each character of the type name of validateList.
Try :
foreach(var item in validateList)
The test itsef would be if (item!=null) or perhaps if(!String.IsNullOrEmpty(item)) depending on what you really want (ie only null or null or empty string).
When showing some code it's always best to tell exactly what is the behavior you see (here it seems the question you ask is not about the problem you really have if you tried somethjing and it didn't work more likely this is because item is a character rather
than a strring).