Functional Programming, Csharp, Dotnet, Software Development.
format is invalid"); } if (Uri.CheckHostName(email.Split('@')[1]) == UriHostNameType.Unknown) { return (false, "Email domain is invalid"); } return (true, null); } } You can clearly see the distinct steps: Check if email is null or empty Check if email is not too long Check if email format is valid