diff --git a/src/Angor/Client/Pages/Create.razor b/src/Angor/Client/Pages/Create.razor index 179c0255..095c2d73 100644 --- a/src/Angor/Client/Pages/Create.razor +++ b/src/Angor/Client/Pages/Create.razor @@ -127,9 +127,9 @@ @foreach (var stage in project.Stages) {
- +
- +
@@ -324,6 +324,36 @@ private async Task CreatProject() { + if (project.TargetAmount < (decimal)0.1) + { + notificationComponent.ShowErrorMessage("Project target amount must be higher then 0.1 BTC"); + return; + } + + if (project.StartDate < DateTime.UtcNow) + { + notificationComponent.ShowErrorMessage("Project must start in the future"); + return; + } + + if (project.ExpiryDate < project.StartDate) + { + notificationComponent.ShowErrorMessage("Project must expire after start date"); + return; + } + + if (project.Stages.Any() && project.ExpiryDate < project.Stages.Last().ReleaseDate) + { + notificationComponent.ShowErrorMessage("Project expire date must be after the last stage date"); + return; + } + + if (project.PenaltyDays < 10) + { + notificationComponent.ShowErrorMessage("Project penalty must be higher then 10 days"); + return; + } + if (project.Stages.Count() < 3) { notificationComponent.ShowErrorMessage("There must be at least 3 stages");