Вытащил солюшен на уровень выше, чтобы прощё было дотнетить
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is failing
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	continuous-integration/drone/push Build is failing
				
			This commit is contained in:
		| @@ -0,0 +1,18 @@ | ||||
| using System.ComponentModel.DataAnnotations; | ||||
|  | ||||
| namespace BlazorWebAssemblyVisaApiClient.Validation.Applicants.Models | ||||
| { | ||||
|     public enum MaritalStatusModel | ||||
|     { | ||||
|         Other = 0, | ||||
|  | ||||
|         Married = 1, | ||||
|  | ||||
|         Unmarried = 2, | ||||
|  | ||||
|         Separated = 3, | ||||
|  | ||||
|         [Display(Name = "Widow or widower")] | ||||
|         WidowOrWidower = 4 | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,20 @@ | ||||
| using System.ComponentModel.DataAnnotations; | ||||
| using VisaApiClient; | ||||
|  | ||||
| namespace BlazorWebAssemblyVisaApiClient.Validation.Applicants.Models; | ||||
|  | ||||
| /// Model of place of work with attributes required for validation to work | ||||
| public class PlaceOfWorkModel | ||||
| { | ||||
|     [Required] | ||||
|     [StringLength(ConfigurationConstraints.PlaceOfWorkNameLength, MinimumLength = 1)] | ||||
|     public string Name { get; set; } = default!; | ||||
|  | ||||
|     [Required] | ||||
|     [ValidateComplexType] | ||||
|     public AddressModel Address { get; set; } = new AddressModel(); | ||||
|  | ||||
|     [Required] | ||||
|     [StringLength(ConfigurationConstraints.PhoneNumberLength, MinimumLength = ConfigurationConstraints.PhoneNumberMinLength)] | ||||
|     public string PhoneNum { get; set; } = default!; | ||||
| } | ||||
| @@ -0,0 +1,67 @@ | ||||
| using System.ComponentModel.DataAnnotations; | ||||
| using Newtonsoft.Json; | ||||
| using Newtonsoft.Json.Converters; | ||||
| using VisaApiClient; | ||||
|  | ||||
| namespace BlazorWebAssemblyVisaApiClient.Validation.Applicants.Models; | ||||
|  | ||||
| /// Model of request with attributes required for validation to work | ||||
| public class RegisterApplicantRequestModel | ||||
| { | ||||
|     [Required] | ||||
|     [ValidateComplexType] | ||||
|     public RegisterRequestModel RegisterRequest { get; set; } = new(); | ||||
|  | ||||
|     [Required] | ||||
|     [ValidateComplexType] | ||||
|     public NameModel ApplicantName { get; set; } = new(); | ||||
|  | ||||
|     [Required] | ||||
|     [ValidateComplexType] | ||||
|     public PassportModel Passport { get; set; } = new(); | ||||
|  | ||||
|     [Required(AllowEmptyStrings = true)] | ||||
|     public DateTimeOffset BirthDate { get; set; } | ||||
|  | ||||
|     [Required] | ||||
|     [StringLength(70, MinimumLength = 1)] | ||||
|     public string CityOfBirth { get; set; } = default!; | ||||
|  | ||||
|     [Required] | ||||
|     [StringLength(70, MinimumLength = 1)] | ||||
|     public string CountryOfBirth { get; set; } = default!; | ||||
|  | ||||
|     [Required] | ||||
|     [StringLength(30, MinimumLength = 1)] | ||||
|     public string Citizenship { get; set; } = default!; | ||||
|  | ||||
|     [Required] | ||||
|     [StringLength(30, MinimumLength = 1)] | ||||
|     public string CitizenshipByBirth { get; set; } = default!; | ||||
|  | ||||
|     [Required(AllowEmptyStrings = true)] | ||||
|     [JsonConverter(typeof(StringEnumConverter))] | ||||
|     public Gender Gender { get; set; } | ||||
|  | ||||
|     [Required(AllowEmptyStrings = true)] | ||||
|     [JsonConverter(typeof(StringEnumConverter))] | ||||
|     public MaritalStatusModel MaritalStatus { get; set; } | ||||
|  | ||||
|     [Required] | ||||
|     [ValidateComplexType] | ||||
|     public NameModel FatherName { get; set; } = new(); | ||||
|  | ||||
|     [Required] | ||||
|     [ValidateComplexType] | ||||
|     public NameModel MotherName { get; set; } = new(); | ||||
|  | ||||
|     [Required] | ||||
|     [StringLength(50, MinimumLength = 1)] | ||||
|     public string JobTitle { get; set; } = default!; | ||||
|  | ||||
|     [Required] | ||||
|     [ValidateComplexType] | ||||
|     public PlaceOfWorkModel PlaceOfWork { get; set; } = new(); | ||||
|  | ||||
|     public bool IsNonResident { get; set; } | ||||
| } | ||||
| @@ -0,0 +1,12 @@ | ||||
| using System.ComponentModel.DataAnnotations; | ||||
| using VisaApiClient; | ||||
|  | ||||
| namespace BlazorWebAssemblyVisaApiClient.Validation.Applicants.Models; | ||||
|  | ||||
| /// Model of request with attributes required for validation to work | ||||
| public class RegisterRequestModel | ||||
| { | ||||
|     [Required] | ||||
|     [ValidateComplexType] | ||||
|     public AuthData AuthData { get; set; } = new AuthData(); | ||||
| } | ||||
		Reference in New Issue
	
	Block a user