Lex@SG
Oct 12th, 2005, 12:13 PM
Hi,
I would like to know how do i validate a field that complies with the following conditions:
1) Must Not Be Empty
2) Must Be Numeric
3) Must Be Double (Eg. 1.00) [Up Only Two Decimal Places Allowed]
I have personnally came up with this but it can't work.
if (($pricePerUnit != "") && ((is_numeric($pricePerUnit) == false) || (is_double($pricePerUnit) == false)))
I would like to know how do i validate a field that complies with the following conditions:
1) Must Not Be Empty
2) Must Be Numeric
3) Must Be Double (Eg. 1.00) [Up Only Two Decimal Places Allowed]
I have personnally came up with this but it can't work.
if (($pricePerUnit != "") && ((is_numeric($pricePerUnit) == false) || (is_double($pricePerUnit) == false)))