Files
Otchislator/src/Otchinslator/UserDTO.cs

26 lines
1008 B
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 Otchinslator;
public class UserDTO
{
[Required]
[StringLength(500, MinimumLength = 50, ErrorMessage = "Причина должна быть от 50 до 500 символов")]
public string reason { get; set; }
[Required]
[Phone(ErrorMessage = "Некорректный номер телефона")]
[StringLength(15, MinimumLength = 10, ErrorMessage = "Номер телефона должен быть от 10 до 15 символов")]
public string phone { get; set; }
[Required(ErrorMessage = "Курс не указан")]
[Range(1, 5, ErrorMessage = "Курс должен быть от 1 до 5")]
public int kurs { get; set; }
[Required]
public bool isFreeEducation { get; set; }
[Required]
public bool isOchno { get; set; }
[Required]
[Range(1, 3, ErrorMessage = "Некорректный тип специальности")]
public int speciality { get; set; }
}