Post
Topic
Board Development & Technical Discussion
Re: Regex for bitcoin amounts?
by
chetrasho
on 22/05/2011, 17:54:26 UTC

Well, the variable $bitcoinamount is coming form post data $_POST['bitcoinamount']. So it's not necessarily a number to begin with.

I guess I could do something like

if ( is_float($ba) &&  $ba <= 21E6 && num_decimals($ba) <= 8 ) { return true; }

But I need a num_decimals() function.