I was wondering if I was missing something but here goes....

I would like to build my own custom module. That is fairly simple. The only problem is, I need to add validations to my custom forms. For example, making sure that a number entered is positive... a value entered is not a duplicate... all the validations you can think of.

If I want to do this, do I have to modify the existing php code for sugar? Or, is there a way to do add the code to the objects I add on a form... (I have looked, but I could not find...)

Thank you in advance for your guidance...