diff --git a/src/Form.php b/src/Form.php index 377137f..fb19f17 100644 --- a/src/Form.php +++ b/src/Form.php @@ -211,7 +211,7 @@ public static function validate(array $data, array $rules) $errorMessage = str_replace( ['{field}', '{Field}', '{value}'], - [$field, ucfirst($field), $value], + [$field, ucfirst($field), is_array($value) ? json_encode($value) : $value], static::$messages[$rule[0]] ?? static::$messages[explode('(', $rule[0])[0] ?? 'any'] ?? '{Field} is invalid!' );