Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Validation for negative numbers

843789Dec 30 2009 — edited Dec 30 2009
Hi,

I have "quantity" variable as an Integer datatype , which should not allow "0" (zero) or "any negative values" (-1). Is there any simple predefined function in java to check this and throw a validation message if quantity is "0" or "-ve"? I should not use Javascript.
Similarly if i add a value "<ragav555>" for "name" field it is added properly but in the update page the value "<ragav555>" is not displayed, this is happening only for "<ragav555>" , for "<555>" it is working fine. The name field is of varchar.

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 27 2010
Added on Dec 30 2009
7 comments
1,065 views