API
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

MyCommon.cs 480B

123456789101112131415161718
  1. using System.Text.RegularExpressions;
  2. namespace UnivateProperties_API.Helpers
  3. {
  4. public static class MyCommon
  5. {
  6. public static bool IsValidEmail(string item)
  7. {
  8. if (!string.IsNullOrEmpty(item))
  9. {
  10. Regex regex = new Regex(@"^([\w\.\-]+)@([\w\-]+)((\.(\w){2,3})+)$");
  11. Match match = regex.Match(item);
  12. return match.Success;
  13. }
  14. else return false;
  15. }
  16. }
  17. }