验证grails中的精度

时间:2015-07-29 17:41:20

标签: grails groovy

我想知道你如何验证grails中的精度?我看到了规模,但不是文档中的精确度。

实施例

static constraints = {
    percentTime( nullable: true, precision: 5, scale: 4)
}

1.003 works fine.
10 fails with an exception.

https://grails.github.io/grails-doc/latest/ref/Constraints/Usage.html

0 个答案:

没有答案