Today I upgraded the codebase to Nest v11 and since I have this issue with a DTO:
export class TestDto {
@IsEthereumAddress({ each: true })
addresses: Address[];
}
I query the endpoint like this:
https://test.com/?addresses[]=0x0&addresses[]=0x1
The above used to work with Nest 10 and now fails with a Bad Request.
Note that the project is using Express.
{
"message": [
"each value in addresses must be an Ethereum address"
],
"error": "Bad Request",
"statusCode": 400
}
The requests succeeds if I remove the brackets from the URL:
https://test.com/?addresses=0x0&addresses=0x1
But I still need it to work with the brackets.
I didnt find anything in the documentation regarding a change like this. Would love a pointer to where I should look to allow the brackets again as it's a breaking change in the API. 🙏