protected function digits($param)
    {
        $digits = $param[0];

        if ($this->isNumeric()) {
            return [
                'min' => pow(10, $digits - 1),
                'max' => pow(10, $digits) - 1,
            ];
        }

        return [
            'pattern' => '\d{'.$digits.'}',
            'title' => $this->getTitle('digits', compact('digits')),
        ];
    }
protected function digits($param)
    {
        $digits = $param[0];

        if ($this->isNumeric()) {
            return [
                'min' => pow(10, $digits - 1),
                'max' => pow(10, $digits) - 1,
            ];
        }

        return [
            'pattern' => '\d{'.$digits.'}',
            'title' => $this->getTitle('digits', compact('digits')),
        ];
    }
protected function digits ( $ param ) { $ digits = $ param [ 0 ] ; if ( $ this -> isNumeric ( ) ) { return [ 'min' => pow ( 10 , $ digits - 1 ) , 'max' => pow ( 10 , $ digits ) - 1 , ] ; } return [ 'pattern' => '\d{' . $ digits . '}' , 'title' => $ this -> getTitle ( 'digits' , compact ( 'digits' ) ) , ] ; }
Check that the value is numeric and contains exactly the given digits.

digits:3  --> min="100" max="999"
digits:3  --> pattern="\d{3,5}"  (text)

@param $param
@return array

@see http://laravel.com/docs/5.1/validation#rule-digits
Check that the value is numeric and contains exactly the given digits .