java - How to use JSR 303 @Valid annotation to validate primitive types? -


jsr 303 @valid annotation can used validate input objects controller method, demonstrated on mkyong.com

is possible use @valid annotation validate primitive types int , long[]? if so, how?

here example spring mvc method signature needs validated parameters above 0:

@requestmapping(value = { "/delete" }, method = requestmethod.post) modelandview deletebulk(@requestparam("userid") int userid, @requestparam("ids") long[] ids) { 

no, can't done. it's bean validation, described here.


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -