Add checks for the Indicator request endpoint
This commit is contained in:
@@ -13,27 +13,33 @@ public class IndicatorRequestDto
|
|||||||
/// Name of the indicator (e.g., "MACD", "RSI", "Bollinger Bands")
|
/// Name of the indicator (e.g., "MACD", "RSI", "Bollinger Bands")
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required]
|
[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;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Strategy or description of how the indicator is used (e.g., "MACD Cross", "RSI Divergence")
|
/// Strategy or description of how the indicator is used (e.g., "MACD Cross", "RSI Divergence")
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required]
|
[Required]
|
||||||
|
[StringLength(1000, MinimumLength = 10, ErrorMessage = "Strategy description must be between 10 and 1000 characters.")]
|
||||||
public string StrategyDescription { get; set; } = string.Empty;
|
public string StrategyDescription { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Primary documentation URL for the indicator
|
/// Primary documentation URL for the indicator
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Url(ErrorMessage = "Documentation URL must be a valid URL.")]
|
||||||
public string? DocumentationUrl { get; set; }
|
public string? DocumentationUrl { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Image URL for the indicator (optional) - can be a chart, diagram, or visual representation
|
/// Image URL for the indicator (optional) - can be a chart, diagram, or visual representation
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Url(ErrorMessage = "Image URL must be a valid URL.")]
|
||||||
public string? ImageUrl { get; set; }
|
public string? ImageUrl { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Name of the person requesting the indicator
|
/// Telegram account handle of the person requesting the indicator (e.g., "cryptooda")
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required]
|
[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;
|
public string RequesterName { get; set; } = string.Empty;
|
||||||
}
|
}
|
||||||
@@ -5103,11 +5103,11 @@ export interface PrivyInitAddressResponse {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface IndicatorRequestDto {
|
export interface IndicatorRequestDto {
|
||||||
indicatorName?: string;
|
indicatorName: string;
|
||||||
strategyDescription?: string;
|
strategyDescription: string;
|
||||||
documentationUrl?: string;
|
documentationUrl?: string | null;
|
||||||
imageUrl?: string | null;
|
imageUrl?: string | null;
|
||||||
requesterName?: string;
|
requesterName: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface LoginRequest {
|
export interface LoginRequest {
|
||||||
|
|||||||
@@ -1234,11 +1234,11 @@ export interface PrivyInitAddressResponse {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface IndicatorRequestDto {
|
export interface IndicatorRequestDto {
|
||||||
indicatorName?: string;
|
indicatorName: string;
|
||||||
strategyDescription?: string;
|
strategyDescription: string;
|
||||||
documentationUrl?: string;
|
documentationUrl?: string | null;
|
||||||
imageUrl?: string | null;
|
imageUrl?: string | null;
|
||||||
requesterName?: string;
|
requesterName: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface LoginRequest {
|
export interface LoginRequest {
|
||||||
|
|||||||
Reference in New Issue
Block a user