public function rule_decimal_places($a)
    {
        $places = $this->pullRule();
        $pattern = sprintf('/^[0-9]+\.[0-9]{%s}$/', $places);
        if (!preg_match($pattern, $a)) {
            return $this->fail('Must have {{arg1}} decimal places', $places);
        }
    }
public function rule_decimal_places($a)
    {
        $places = $this->pullRule();
        $pattern = sprintf('/^[0-9]+\.[0-9]{%s}$/', $places);
        if (!preg_match($pattern, $a)) {
            return $this->fail('Must have {{arg1}} decimal places', $places);
        }
    }
public function rule_decimal_places ( $ a ) { $ places = $ this -> pullRule ( ) ; $ pattern = sprintf ( '/^[0-9]+\.[0-9]{%s}$/' , $ places ) ; if ( ! preg_match ( $ pattern , $ a ) ) { return $ this -> fail ( 'Must have {{arg1}} decimal places' , $ places ) ; } }
Checks for a specific number of
decimal places.

Arg: int- number of places
Checks for a specific number of decimal places .