| 123456789101112131415161718 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using System.Text.RegularExpressions;
- public class ValidateHelper
- {
- public static bool IsEmail(string email)
- {
- return Regex.IsMatch(email, @"^\w+([-+.\']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$", RegexOptions.IgnoreCase);
- }
- public static bool IsMobilePhone(string phone)
- {
- // return Regex.IsMatch(phone, @"^(((13[0-9]{1})|(15[0-35-9]{1})|(17[0-9]{1})|(18[0-9]{1})|(19[0-9]{1}))+\d{8})$");
- return phone.Length == 11;
- }
- }
|