From a65f41335376e291d4b96a08ef49c5de5263c19e Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Wed, 14 Feb 2024 11:40:28 +0100 Subject: [PATCH] Adjust rules call sequence --- src/Illuminate/Foundation/Http/FormRequest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Illuminate/Foundation/Http/FormRequest.php b/src/Illuminate/Foundation/Http/FormRequest.php index 93e7d20026e0..4824c27c1799 100644 --- a/src/Illuminate/Foundation/Http/FormRequest.php +++ b/src/Illuminate/Foundation/Http/FormRequest.php @@ -115,9 +115,11 @@ protected function getValidatorInstance() */ protected function createDefaultValidator(ValidationFactory $factory) { + $rules = $this->validationRules(); + $validator = $factory->make( $this->validationData(), - $this->validationRules(), + $rules, $this->messages(), $this->attributes(), )->stopOnFirstFailure($this->stopOnFirstFailure);