Started CreateApplication.razor

This commit is contained in:
2024-09-06 10:05:59 +03:00
parent 70c989bee2
commit 53d5758527
28 changed files with 208 additions and 105 deletions

View File

@@ -0,0 +1,40 @@
using System.ComponentModel.DataAnnotations;
using VisaApiClient;
namespace BlazorWebAssemblyVisaApiClient.Validation.VisaApplications.Models
{
/// Model for request for data annotations validation to work
public class VisaApplicationCreateRequestModel
{
[ValidateComplexType]
public ReentryPermitModel? ReentryPermit { get; set; } = new();
[Required]
[MaxLength(ConfigurationConstraints.CountryNameLength)]
public string DestinationCountry { get; set; } = default!;
[Required]
public VisaCategory VisaCategory { get; set; }
[Required]
public bool IsForGroup { get; set; }
[Required]
public RequestedNumberOfEntries RequestedNumberOfEntries { get; set; }
[Required]
[Range(0, ConfigurationConstraints.MaxValidDays)]
public int ValidDaysRequested { get; set; }
[Required]
[ValidateComplexType]
public PastVisaModel[] PastVisas { get; set; } = default!;
[ValidateComplexType]
public PermissionToDestCountryModel? PermissionToDestCountry { get; set; } = new();
[Required]
[ValidateComplexType]
public PastVisitModel[] PastVisits { get; set; } = default!;
}
}