1 Star 0 Fork 837

少年郎/iotgateway

forked from Sam/iotgateway 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
FrameworkUser.cs 1.39 KB
一键复制 编辑 原始数据 按行查看 历史
Sam 提交于 2021-12-12 14:55 . 初步可用版本
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace WalkingTec.Mvvm.Core
{
/// <summary>
/// FrameworkUser
/// </summary>
[Table("FrameworkUsers")]
public class FrameworkUser : FrameworkUserBase
{
[Display(Name = "_Admin.Email")]
[RegularExpression("^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$", ErrorMessage = "Validate.{0}formaterror")]
[StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")]
public string Email { get; set; }
[Display(Name = "_Admin.Gender")]
public GenderEnum? Gender { get; set; }
[Display(Name = "_Admin.CellPhone")]
[RegularExpression("^[1][3-9]\\d{9}$", ErrorMessage = "Validate.{0}formaterror")]
public string CellPhone { get; set; }
[Display(Name = "_Admin.HomePhone")]
[StringLength(30, ErrorMessage = "Validate.{0}stringmax{1}")]
[RegularExpression("^[-0-9\\s]{8,30}$", ErrorMessage = "Validate.{0}formaterror")]
public string HomePhone { get; set; }
[Display(Name = "_Admin.Address")]
[StringLength(200, ErrorMessage = "Validate.{0}stringmax{1}")]
public string Address { get; set; }
[Display(Name = "_Admin.ZipCode")]
[RegularExpression("^[0-9]{6,6}$", ErrorMessage = "Validate.{0}formaterror")]
public string ZipCode { get; set; }
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/shaonl/iotgateway.git
git@gitee.com:shaonl/iotgateway.git
shaonl
iotgateway
iotgateway
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385