This commit is contained in:
2023-12-18 18:24:39 +08:00
parent 271e481035
commit 6621c5f247
3 changed files with 13 additions and 17 deletions
+4 -9
View File
@@ -34,18 +34,13 @@ abstract class BaseValidator
/**
* @param $field
* @param $message
* @param string $field
* @param string $message
* @return bool
*/
public function addError($field, $message): bool
public function addError(string $field, string $message): bool
{
if (!is_null($field)) {
$message = str_replace(':attribute', $field, $message);
}
$this->message = $message;
$this->message = str_replace(':attribute', $field, $message);
return false;
}