spring - typeMismatch error, even with typeMismatch=msg in messages.properties -
i'm still having fatal error instead of normal form validation when try type string in int field of jsp form. i've added typemismatch=msg in messages.properties (howto validate collections in maps) didn't work. else missing?
found problem : can't write :
@requestmapping(value = "/addsomething", method = requestmethod.post) public string addsomething( @modelattribute("something") something, @valid validsomething, bindingresult result, modelmap map) { ... some attributes had converted string int , conversion made before validation. not good! , validsomething useless. has fixed problem :
@requestmapping(value = "/addsomething", method = requestmethod.post) public string addsomething( @valid @modelattribute("something") something, bindingresult result, modelmap map) { ... that proves better put code in question. , "you" mean me.
Comments
Post a Comment