I have 2 models, customers and packages. When I send the data to the API, it does not validate the nested data. The strange thing is that data that does not match the validation that I have in the Schema, it discards it without throwing any errors (ValidatorError).
I want to create a package for a client, but if the client does not exist, I want to create it in the same call. I check if the client already exists by his NID. But it only validates the fields in the package.
Is there some way to validate nested objects?
I have 2 models, customers and packages. When I send the data to the API, it does not validate the nested data. The strange thing is that data that does not match the validation that I have in the Schema, it discards it without throwing any errors (ValidatorError).
I want to create a package for a client, but if the client does not exist, I want to create it in the same call. I check if the client already exists by his NID. But it only validates the fields in the package.
any idea or example?