this is not a ngui question, this is more a c# programming question.
This can be accomplished with regular expressions.
something like this:
string pattern = @"^(?!\.)(""([^""\r\\]|\\[""\r\\])*""|"
+ @"([-a-z0-9!#$%&'*+/=?^_`{|}~]|(?<!\.)\.)*)(?<!\.)"
+ @"@[a-z0-9][\w\.-]*[a-z0-9]\.[a-z][a-z\.]*[a-z]$";
Regex regex
= new Regex
(pattern
);string email = input.value;
Match match = regex.Match(email);
if (match.Success)
Debug.Log(email + " is correct");
else
Debug.Log(email + " is incorrect");
I didn't test this, but if doesn't work try to check how to use regular expressions on c#.