I am using Grails 3. I have the following field:
<g:field id="myVar" name="myVar" type="number" value="${this.myController?.myVar}"/>
Domain class:
class myDomain{
int myVar
static constraints ={
myVar nullable:true, blank:true
}
}
When I try to submit this field, it will not allow a blank answer. I have it set up in my constraints in the domain class that this field can be null and blank. All of the number fields inside of my form are giving me this error, yet I can leave other fields blank. This is the error message:
Property myVar is type-mismatched
Is there a setting I am missing?