Files
Backend-Api/CompanyManagment.App.Contracts/Representative/CreateRealRepresentative.cs

54 lines
1.5 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System.ComponentModel.DataAnnotations;
namespace CompanyManagment.App.Contracts.Representative;
public class CreateRealRepresentative
{
/// <summary>
/// نام کوچک
/// </summary>
[Required(ErrorMessage = "این مقدار نمی تواند خالی باشد")]
public string FName { get; set; }
/// <summary>
/// نام خانوادگی
/// </summary>
[Required(ErrorMessage = "این مقدار نمی تواند خالی باشد")]
public string LName { get; set; }
/// <summary>
/// کد ملی
/// </summary>
[RegularExpression("^[0-9]*$", ErrorMessage = "لطفا فقط عدد وارد کنید")]
public string Nationalcode { get; set; }
/// <summary>
/// شماره شناسنامه
/// </summary>
[MaxLength(12)]
[MinLength(1)]
[RegularExpression("^[0-9]*$", ErrorMessage = "لطفا فقط عدد وارد کنید")]
public string IdNumber { get; set; }
/// <summary>
/// شماره تلفن
/// </summary>
[DataType(DataType.PhoneNumber)]
[RegularExpression(@"^\(?([0-9]{4})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$", ErrorMessage = "لطفا شماره تلفن معتبر وارد کنید")]
public string Phone { get; set; }
[RegularExpression("^[0-9]*$", ErrorMessage = "لطفا فقط عدد وارد کنید")]
public string AgentPhone { get; set; }
/// <summary>
/// آدرس
/// </summary>
public string Address { get; set; }
}