customerCode = $customerCode; } public function check($value) : bool { if (!is_string($value)) return false; if (strlen($value) !== 5) return false; if(strlen($this->customerCode)){ try { KeysConverter::getTblPark($this->customerCode, $value); }catch(Exception){ return false; } } return true; } /** * Get the validation error message. * * @return string */ public function message() { return '正しくありません'; } }