integerDigits . '}(?:\.\d{1,' . $this->decimalPlaces . '})?$/D', (string) $value ) === 1; } public function message(): string { return ':attribute 格式错误,最多 ' . $this->integerDigits . ' 位整数和 ' . $this->decimalPlaces . ' 位小数'; } }