From 8a95fa79658cee00b3e759b702f046229c14db69 Mon Sep 17 00:00:00 2001 From: sawater Date: Fri, 25 Aug 2017 17:44:18 +0800 Subject: [PATCH] fix right value on update strategy --- modules/api/app/controller/strategy/strategy_controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/api/app/controller/strategy/strategy_controller.go b/modules/api/app/controller/strategy/strategy_controller.go index 74deec1ba..d3d5b83f3 100644 --- a/modules/api/app/controller/strategy/strategy_controller.go +++ b/modules/api/app/controller/strategy/strategy_controller.go @@ -135,7 +135,7 @@ type APIUpdateStrategyInput struct { func (this APIUpdateStrategyInput) CheckFormat() (err error) { validOp := regexp.MustCompile(`^(>|=|<|!)(=)?$`) - validRightValue := regexp.MustCompile(`^\d+$`) + validRightValue := regexp.MustCompile(`^\-?\d+(\.\d+)?$`) validTime := regexp.MustCompile(`^\d{2}:\d{2}$`) switch { case !validOp.MatchString(this.Op):