diff --git a/BaseValidator.php b/BaseValidator.php index 7bf7702..b1ade6b 100644 --- a/BaseValidator.php +++ b/BaseValidator.php @@ -103,7 +103,9 @@ abstract class BaseValidator { $this->isFail = FALSE; - $message = str_replace(':attribute', $field, $message); + if (!is_null($field)) { + $message = str_replace(':attribute', $field, $message); + } $this->message = $message;