ä»é±ã¯ .NET Framework ã®æ£è¦è¡¨ç¾ã¨ã¡ã¼ã«ã¢ãã¬ã¹æ¤è¨¼ã«ç®ãã£ã±ãæ©ã¾ããã¾ãããäºã®é¡æ«ã説æããã¨ä»¥ä¸ã®ãããªæãã æ£è¦è¡¨ç¾ Regex ã¯ã©ã¹ã¯ããã©ã«ãã§ã¯æåã¯ã©ã¹ã®æ±ããªã©ããECMAScript ã®æåã¨ã¯ç°ãªãã®ã§æ©ã¿ã¾ããã ããããã¦ï¼.NET ã®æ£è¦è¡¨ç¾ã§ \d ã¯å
¨è§ãéãâ ãã°ãã (@shibayan) June 18, 2013 ã³ã¼ãä¾ãåºãã¦èª¬æããã¨ãé»è©±çªå·ã®ããã«æ°å¤ï¼ã¨ãã¤ãã³ã¨ãï¼ã®ã¿å
¥åå¯è½ã«ããæ¤è¨¼ãæ£è¦è¡¨ç¾ã§æ¸ãã¦ããããã§ããã public class User { // 03-1234-5678 ã¨ããé»è©±çªå·ãæå¾
[RegularExpression(@"\d{2,4}\-\d{1,5}\-\d{4}")] public string PhoneNumber { get; set; } } ããæ¸ãã¨ãåè§æ°åã
{{#tags}}- {{label}}
{{/tags}}