We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b98c1b1 + 76211dc commit 7700c58Copy full SHA for 7700c58
doctrine.rst
@@ -448,12 +448,8 @@ Consider the following controller code::
448
public function createProduct(ValidatorInterface $validator): Response
449
{
450
$product = new Product();
451
- // This will trigger an error: the column isn't nullable in the database
452
- $product->setName(null);
453
- // This will trigger a type mismatch error: an integer is expected
454
- $product->setPrice('1999');
455
456
- // ...
+ // ... update the product data somehow (e.g. with a form) ...
457
458
$errors = $validator->validate($product);
459
if (count($errors) > 0) {
0 commit comments