As a baseline, we must use strict types in PHP, typescript in js etc. (or strongly typed languages of course haha) to avoid basic pitfalls. There are more to defensive programming, the main cases I have seen during all these years come from "logical" errors. Good code review, strong team and unit testing should catch these errors.
This is a useful article, but I think you forgot something, validate forms also in the server, maybe you did not forgot it only you wanted to share the concept of Defensive programming.
This is a real important topic. Url line also important to count as user input on any moment (even first)
Nice article.
As a baseline, we must use strict types in PHP, typescript in js etc. (or strongly typed languages of course haha) to avoid basic pitfalls. There are more to defensive programming, the main cases I have seen during all these years come from "logical" errors. Good code review, strong team and unit testing should catch these errors.
Absolutely agree!
If you like zod, try valibot.
Sure, will give it a try...
Might even make a post about it later on
Nice!
Thanks
Nice
Thanks
Very insightful
Thanks
This is a useful article, but I think you forgot something, validate forms also in the server, maybe you did not forgot it only you wanted to share the concept of Defensive programming.
Appreciate the feedback @florian_dollani