Skip to content

Commit 518fd5b

Browse files
committed
add footnote on Bootstrap docs' client-side validation suggestion
1 parent 1514a81 commit 518fd5b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

chapter_13_database_layer_validation.asciidoc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,20 @@ been passed an error variable, and if so, we do this:
260260
((("form control classes (Bootstrap)")))
261261
Take a look at the https://getbootstrap.com/docs/5.3/forms/validation/#server-side[Bootstrap docs] for more
262262
info on form controls.
263+
footnote:[... and ignore their advice to prefer client-side validation.
264+
Ideally, having both server- and client-side validation is the best.
265+
If you can't do both, then server-side validation is the one you really can't do
266+
without.
267+
Check the
268+
https://owasp.org/www-project-secure-coding-practices-quick-reference-guide/stable-en/02-checklist/05-checklist.html[OWASP checklist],
269+
if you are not convinced yet.
270+
Client-side validation will provide faster feedback on the UI, but
271+
https://cheatsheetseries.owasp.org/cheatsheets/Input_Validation_Cheat_Sheet.html#client-side-vs-server-side-validation[it is not a security measure.]
272+
Server-side validation is indispensable for handling any input
273+
that gets processed by the server -- and it will also provide albeit slower,
274+
feedback for the client side.]
275+
276+
263277
// CSANAD: these are the new docs for Bootstrap, but for some reason they begin
264278
// with saying "We recommend client-side validation" which is bad.
265279
// Client side validation is fine for faster UI aesthetics, sure. But they are

0 commit comments

Comments
 (0)