Edit this to <input type="number" name="rating" required="" value="">
Submit a rating outside the 1-5 range
You'll get an error, but it saves!
Open the reviews panel
Results
Instead of the validation on the modal box, there is a pop up on the page telling you an incorrect value was entered, but it still accepts this value into the database!
Additional Notes
Frontend validation is not enough here, you need to be validating this in the database as well! You can find easy detailed implementation instructions for the model here https://docs.djangoproject.com/en/4.1/ref/models/fields/
Environment Information: OS Windows 11 Browser - Brave 1.45.127 Chromium 107.0.5304.110 (Extensions Disabled - Private Browser Window) Credential Used - user5@test.com
Reproduction Steps
<input type="number" name="rating" required="" min="1" max="5" value="">
<input type="number" name="rating" required="" value="">
Results Instead of the validation on the modal box, there is a pop up on the page telling you an incorrect value was entered, but it still accepts this value into the database!
Additional Notes Frontend validation is not enough here, you need to be validating this in the database as well! You can find easy detailed implementation instructions for the model here https://docs.djangoproject.com/en/4.1/ref/models/fields/