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

Popular posts from this blog

php - mySql Join with 4 tables -

css - Text drops down with smaller window -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -