Skip to content

Commit

Permalink
Merge pull request #233 from sawater/fix_right_value_on_update
Browse files Browse the repository at this point in the history
[api] fix right value on update strategy
  • Loading branch information
laiwei authored Aug 29, 2017
2 parents 1d89dc0 + 8a95fa7 commit 5f03420
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/api/app/controller/strategy/strategy_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 5f03420

Please sign in to comment.