Quantcast
Channel: Active questions tagged symfony4 - Stack Overflow
Viewing all articles
Browse latest Browse all 3924

Symfony Validator: validate by comparing the old value from the DB

$
0
0

I'm working with Symfony 4.4,

For security reason, when submitting OrderProduct entity that embedd Product entity, I have to control some values of OrderProduct taken from Product.

So, it's an Symfony API, I receive an orderProduct in a JSON format:

{"product" : { "id" : 82 },"price" : 9.7,"quantity": 3,   //...}

I have to get the product from the database, to test if the price is correct.


Viewing all articles
Browse latest Browse all 3924

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>