Question:

Failing validation doesn't stop code execution

Name: Sam
Score: 0
Failing validation doesn't stop code execution
-
I'm trying to show a list of models. Having a text filter posed no problem but when trying to add a year filter, problems started occurring. If a non-numeric value is sent back from the from or to input, I expected validation to catch it and just flash some errors to the session but instead I still get SQL errors because either from or to were not numeric (for example: invalid input syntax for integer: "2020a" (SQL: select * f rom "my_models" where "year" between 2020a and 2021)) Livewire Component code
0 +
Answers :
Register / Login