'test'], ['__TEST' => $value])->fails(); } catch (BadMethodCallException $badMethodCallException) { $matches = []; $rule = preg_match('/Method (.+) does not exist\./', $badMethodCallException->getMessage(), $matches) === 1 ? Str::snake(Str::after(Str::afterLast($matches[1], '::'), 'validate')) : $value; $fail('exceptions.egg.variables.bad_validation_rule')->translate(['rule' => $rule]); } } }