diff --git a/src/Managing.Api/Models/Requests/IndicatorRequestDto.cs b/src/Managing.Api/Models/Requests/IndicatorRequestDto.cs
index 64f293d2..76ae1f10 100644
--- a/src/Managing.Api/Models/Requests/IndicatorRequestDto.cs
+++ b/src/Managing.Api/Models/Requests/IndicatorRequestDto.cs
@@ -13,27 +13,33 @@ public class IndicatorRequestDto
/// Name of the indicator (e.g., "MACD", "RSI", "Bollinger Bands")
///
[Required]
- public string IndicatorName { get; set; }
+ [StringLength(200, MinimumLength = 4, ErrorMessage = "Indicator name must be between 4 and 200 characters.")]
+ public string IndicatorName { get; set; } = string.Empty;
///
/// Strategy or description of how the indicator is used (e.g., "MACD Cross", "RSI Divergence")
///
[Required]
+ [StringLength(1000, MinimumLength = 10, ErrorMessage = "Strategy description must be between 10 and 1000 characters.")]
public string StrategyDescription { get; set; } = string.Empty;
///
/// Primary documentation URL for the indicator
///
+ [Url(ErrorMessage = "Documentation URL must be a valid URL.")]
public string? DocumentationUrl { get; set; }
///
/// Image URL for the indicator (optional) - can be a chart, diagram, or visual representation
///
+ [Url(ErrorMessage = "Image URL must be a valid URL.")]
public string? ImageUrl { get; set; }
///
- /// Name of the person requesting the indicator
+ /// Telegram account handle of the person requesting the indicator (e.g., "cryptooda")
///
[Required]
+ [RegularExpression(@"^(?=(?:[0-9_]*[a-z]){3})[a-z0-9_]{5,}$",
+ ErrorMessage = "Requester name must be a valid Telegram handle (lowercase letters, numbers, underscores only, minimum 5 characters with at least 3 letters).")]
public string RequesterName { get; set; } = string.Empty;
}
\ No newline at end of file
diff --git a/src/Managing.WebApp/src/generated/ManagingApi.ts b/src/Managing.WebApp/src/generated/ManagingApi.ts
index 2d3374fa..c433713d 100644
--- a/src/Managing.WebApp/src/generated/ManagingApi.ts
+++ b/src/Managing.WebApp/src/generated/ManagingApi.ts
@@ -5103,11 +5103,11 @@ export interface PrivyInitAddressResponse {
}
export interface IndicatorRequestDto {
- indicatorName?: string;
- strategyDescription?: string;
- documentationUrl?: string;
+ indicatorName: string;
+ strategyDescription: string;
+ documentationUrl?: string | null;
imageUrl?: string | null;
- requesterName?: string;
+ requesterName: string;
}
export interface LoginRequest {
diff --git a/src/Managing.WebApp/src/generated/ManagingApiTypes.ts b/src/Managing.WebApp/src/generated/ManagingApiTypes.ts
index fdb06b4b..daf59e5f 100644
--- a/src/Managing.WebApp/src/generated/ManagingApiTypes.ts
+++ b/src/Managing.WebApp/src/generated/ManagingApiTypes.ts
@@ -1234,11 +1234,11 @@ export interface PrivyInitAddressResponse {
}
export interface IndicatorRequestDto {
- indicatorName?: string;
- strategyDescription?: string;
- documentationUrl?: string;
+ indicatorName: string;
+ strategyDescription: string;
+ documentationUrl?: string | null;
imageUrl?: string | null;
- requesterName?: string;
+ requesterName: string;
}
export interface LoginRequest {