From 46bdeda6223eeb0b21d4bedfd9ca385bf9b72126 Mon Sep 17 00:00:00 2001 From: ASAPTom99 <44988468+ASAPTom99@users.noreply.github.com> Date: Thu, 20 Mar 2025 23:39:44 -0400 Subject: [PATCH] Update README.md Fixed broken code sample for section: #### Custom Message for Specific Attribute Rule 1) used $validation_a consistently 2) Replaced incorrect 2nd and 3rd argument for: >messages()->add --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2f79737..d831911 100644 --- a/README.md +++ b/README.md @@ -1260,9 +1260,9 @@ $validation_a = $validator->make($input, [ 'age' => 'required|min:18' ]); -$validation->messages()->add('en', 'age:min', '18+ only'); +$validation_a->messages()->add('en', ['age:min'=> '18+ only']); -$validation->validate(); +$validation_a->validate(); ``` Sometimes you may wish to use parameters from other rules in your error messages. From version 1.6.0