public function getError($key) { if (!$this->hasError($key)) { return null; } $key = $this->transformKey($key); return $this->getErrors()->first($key); }