•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 456,463 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,746 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser: Programming Forums
Views: 3454 | Replies: 2
![]() |
| |
Let's say you want an interactive program to input two numbers, add them together, and display the result. The user types some text, right? Was that text actually representing a valid number? Or do you just blindly add two values that may or may not be there. Data validation, in the context I understand from your question, is merely making sure that the user actually entered two numbers before you try to add them.
•
•
Join Date: Jun 2004
Location: Marin, CA, USA
Posts: 434
Reputation:
Rep Power: 5
Solved Threads: 10
When you explain your program, you make assumptions about what the data is. 'data validation' is when you test for those assumptions in your code.
"My program inputs an age, and I assume the age is between 10 and 100. Then I compute ...."
so, when you input the number that is supposed to be the age, you would verify that it is between 10 and 100 and if not, complain. THAT is data validation.
Dave said that too, I guess. :-)
"My program inputs an age, and I assume the age is between 10 and 100. Then I compute ...."
so, when you input the number that is supposed to be the age, you would verify that it is between 10 and 100 and if not, complain. THAT is data validation.
Dave said that too, I guess. :-)
![]() |
•
•
•
•
•
•
•
•
DaniWeb C++ Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Data validation- want only Int's (C++)
- Validating data (C)
- Senior Data Modeler Opportunity (Tech / IT Consultant Job Offers)
- Data Validation checks (MS Access and FileMaker Pro)
- Help with data validation on booking trip application... (MS Access and FileMaker Pro)
- data validation (MS Access and FileMaker Pro)
Other Threads in the C++ Forum
- Previous Thread: help me develop banking system
- Next Thread: new c++ programer needs help



Hybrid Mode