graphqlite-laravel
graphqlite-laravel copied to clipboard
The 'Validate' attribute works with a string passed
Fix the Validate Attribute. Currently the 'rule' argument passed to the Validate constructor is normalized but if the variable type is string, then it's not handled properly. Now the Validate attribute works properly if it's initialized with something like this:
<?php
class Foo {
public function bar(
#[Validate('some-rule')]
string $name
): string {
return 'ok';
}
}