Calculated validation

jesperlowe

New Member
Hello

My simple donation registration system is starting to look like its going to work out.

Im now after af way to validate the field where the amount (currency) in bills/notes are input.

In denmark the smallest note/bill we have in our currency is 50 danish kr.

So i want to validate the 'amount_bills' field and make sure its dividable by 50 and will only give a number without decimals...
 
Use a PHP validation, with the modulo (%) operator. Something like ...

Code:
return $data % 50 != 0;

... should do it.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top