私は次のものを持っています:
class Img {
static constraints = {
imageSize(nullable: true, maxSize: 1000)
}
}
私のプログラムで imageSize 変数の maxSize を別のものに変更したいのですが、これを試しましたが、うまくいきませんでした:
def img = new Img()
images.imageSize.maxSize = 800
編集:
class Img {
byte[] imageSize
static constraints = {
imageSize(nullable: false, maxSize: 1000)
}
}