Client-side vs server-side validation when saving records #1057
-
QuestionWhen a user tries to write invalid data to a record, where should we perform the validation? On the client, or the server? Can we come up with a generalized approach that will help us determine when to validate on the client and when to validate on the server? ConsiderationsValidation failure scenarios
Arguments for validating on the client
Arguments for validating on the server
Prior discussions
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
I'd like to propose we use client-side validation for (a), and server-side validation for everything else. |
Beta Was this translation helpful? Give feedback.
-
I think client-side validation wherever possible with server-side as a fallback makes sense, I'd propose doing it for:
Reasoning: I think better UX trumps other arguments here, and I don't think that the development time/complexity reduction is significant (I assume it will be hours, not days). New situations should be evaluated on a case-by-case basis, but this should provide a good guideline. |
Beta Was this translation helpful? Give feedback.
-
To move forward with a decision, I'm marking this as the answer from @kgodey's comment:
|
Beta Was this translation helpful? Give feedback.
To move forward with a decision, I'm marking this as the answer from @kgodey's comment: