From 036be1ba80e6f74fbaaa4587ee17da1d711a8c3b Mon Sep 17 00:00:00 2001 From: Yash Raj Bothra <47683556+yashrajbothra@users.noreply.github.com> Date: Thu, 9 Apr 2020 14:13:50 +0530 Subject: [PATCH] Updated Working Example The previous Example is not working. This would be a quick fix --- docs/contexts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/contexts.md b/docs/contexts.md index 6732601..0a326e6 100644 --- a/docs/contexts.md +++ b/docs/contexts.md @@ -63,7 +63,7 @@ $v->context('update', function(Validator $context) { // copy the rules (and messages) of the "insert" context. $context->copyContext('insert', function($rules) { foreach ($rules as $key => $chain) { - $context->optional($key); + $chain->required(false); } }); });