0
我的驗證的樣子:外部函數定義域在驗證類
static constraints =
{
someProperty validator: { val, obj ->
// a lot of code here
}
}
我如何定義將通過此驗證(VAL,OBJ requierd)外部函數? 現在我的代碼在約束閉包中不清楚...... someProperty的驗證代碼太多了。 我該如何改變它?
的可能重複[我怎樣才能外部化Grails中的自定義約束?](http://stackoverflow.com/questions/3421204/how-can-i-externalize-a-custom-constraint-in-grails) –