mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-01-19 05:33:31 +01:00
Add bigger than zero validation for payment request amount (#981)
fix #844
This commit is contained in:
parent
3d00611ddf
commit
13f2be7811
@ -48,7 +48,10 @@ namespace BTCPayServer.Models.PaymentRequestViewModels
|
||||
|
||||
public string Id { get; set; }
|
||||
[Required] public string StoreId { get; set; }
|
||||
[Required][Range(0, double.PositiveInfinity)]public decimal Amount { get; set; }
|
||||
|
||||
[Required]
|
||||
[Range(double.Epsilon, double.PositiveInfinity, ErrorMessage = "Please enter a value bigger than zero")]
|
||||
public decimal Amount { get; set; }
|
||||
|
||||
[Display(Name = "The currency used for payment request. (e.g. BTC, LTC, USD, etc.)")]
|
||||
public string Currency { get; set; }
|
||||
|
Loading…
Reference in New Issue
Block a user