plugin icon indicating copy to clipboard operation
plugin copied to clipboard

[Feature Request]: Comment or attribute to mark validation rule array

Open MichelJonkman opened this issue 3 years ago • 0 comments

Feature Description

Basically this https://laravel-idea.com/docs/request_validation#customize-completion but a way to mark it in code using an attribute or comment. I'm currently working on a package that could get used by others and I would like them to have the same rule completion.

For example:

    #[validationRules()]
    public function getValidationRules(): array {
        return [
            'name' => 'required'
        ];
    }

or

    /** @validationRules */
    public function getValidationRules(): array {
        return [
            'name' => 'required'
        ];
    }

This should also mean that any overrides should automatically get auto completion.

MichelJonkman avatar Sep 28 '22 11:09 MichelJonkman