Nullable string in DTO still asks for a string
emsifa opened this issue · comments
Muhammad Syifa commented
When we have DTO:
class SomethingDto extends Dto
{
public ?string $message;
}
And we try to fill with request data:
{
"message": null
}
It results an error "The message must be a string.".
When I dump $rules
in Emsifa\Evo\Http\Body::validateRequest
method, it doesn't have nullable
rule.