Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting validation rules thru function gives error #480

Closed
sivarajd opened this issue Aug 10, 2024 · 1 comment
Closed

Getting validation rules thru function gives error #480

sivarajd opened this issue Aug 10, 2024 · 1 comment

Comments

@sivarajd
Copy link

Using a method in controller class to specify rules gives error:

Validator::make($request->all(), $this->addressRules())->validate();

Error message in API document:
⚠️Cannot generate request documentation: Call to undefined method Dedoc\Scramble\Support\OperationExtensions\RulesExtractor\ValidateCallExtractor::addressRules()

@romalytvynenko
Copy link
Member

@sivarajd this issue will be resolved by this PR: #237

For now, this is a known limitation – as validation rules are being evaluated, you need to either inline them, or use FormRequest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants