Closed damiengrandi closed 4 years ago
I forgot to precise I am using Laravel 7.
I also tried to disable all other extensions, it didn't change anything.
Hello
Look like this is an issue with parentheses and regex I used. If you use this
request()->validate([...])
Or
$this->validate($request, [...])
Should work.
Gonna fix this bug as soon as I can.
Hello, I confirm, it works with :
$this->validate($request, [ 'lol' => '' ])
$request->validate([ 'lol' => '' ])
request()->validate([ 'lol' => '' ])
But not with :
$this->validate(request(), [ 'lol' => '' ])
Also, in case some people don't use auto-closing parentheses or brackets, it does not work without the ending parenthesis )
.
This won't autocomplete :
$this->validate($request, [ 'lol' => ''
Nor this :
$this->validate($request, [ 'lol' => '' ]
Not sure if it's relevant to fix this one though.. But I thought it was important to precise.
@damiengrandi
Please update to version 0.3.3. If this issue still exists let me know.
Validation rules inside controller methods aren't completed anymore.
It works fine if I rollback to v0.2.6: