Validation of user data entered

This is a general question, but I am using a desktop application.

Should I check, for example, the first name exceeding 50 characters or is it a matter of taste?

Or do I need to check> 50 characters because a user could populate my database with 10,000,000 characters?

EDIT:

It seems I launched the ball ... I should have said that the first name / surname in my desktop application is the students that the teacher introduces ...

so 50 characters is more than enough to enter "Michael" and "Kramer", is not it ?; -)

+3
source share
4 answers

. , , , , , , , - , .

+1

, 50 WASP, , , , , ANYWHERE, , - , 10 000 000 , , , , .

0

, , 50 , . , , - . , .

0

A tiered verification strategy is usually appropriate. At the user level, do not allow anything that will subsequently cause errors. However, if you rely on JavaScript validation, remember that it can be easily circumvented. Before storing data in a database, you must also check your level of business and / or data. The same is true if you send data to the service.

Client side validation for ease of use. Server side validation for reliability and integrity.

0
source

Source: https://habr.com/ru/post/1747527/


All Articles