Files
Backend-Api/CompanyManagment.App.Contracts/Representative/CreateRepresentative.cs
2024-07-05 21:36:15 +03:30

50 lines
1.7 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;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CompanyManagment.App.Contracts.Representative;
public class CreateRepresentative
{
[Required(ErrorMessage = "این مقدار نمی تواند خالی باشد")]
public string FName { get; set; }
[Required(ErrorMessage = "این مقدار نمی تواند خالی باشد")]
public string LName { get; set; }
[Required(ErrorMessage = "این مقدار نمی تواند خالی باشد")]
public string LegalName { get; set; }
[RegularExpression("^[0-9]*$", ErrorMessage = "لطفا فقط عدد وارد کنید")]
public string Nationalcode { get; set; }
[MaxLength(12)]
[MinLength(1)]
[RegularExpression("^[0-9]*$", ErrorMessage = "لطفا فقط عدد وارد کنید")]
public string IdNumber { get; set; }
[RegularExpression("^[0-9]*$", ErrorMessage = "لطفا فقط عدد وارد کنید")]
public string RegisterId { get; set; }
[RegularExpression("[0-9]{11}", ErrorMessage = "لطفا فقط عدد 11 رقمی وارد کنید")]
public string NationalId { get; set; }
public string IsLegal { get; set; }
[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; }
public string Address { get; set; }
public string FullName { get; set; }
}