User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 426,462 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,201 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: 3309 | Replies: 2
Reply
Join Date: Aug 2004
Posts: 1
Reputation: merlin208 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
merlin208 merlin208 is offline Offline
Newbie Poster

Data validation

  #1  
Aug 6th, 2004
undefined

I am newbie to C++ and am trying to teach myself to program. Could someone please explain in very simple language what data validation means and how should I check for it (in relation to input data) before any processing occurs.

:-| Merlin208
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Apr 2004
Posts: 3,631
Reputation: Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light 
Rep Power: 17
Solved Threads: 142
Colleague
Dave Sinkula's Avatar
Dave Sinkula Dave Sinkula is offline Offline
long time no c

Re: Data validation

  #2  
Aug 6th, 2004
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.
Reply With Quote  
Join Date: Jun 2004
Location: Marin, CA, USA
Posts: 434
Reputation: Chainsaw is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 9
Chainsaw's Avatar
Chainsaw Chainsaw is offline Offline
Unprevaricator

Re: Data validation

  #3  
Aug 7th, 2004
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. :-)
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb C++ Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the C++ Forum

All times are GMT -4. The time now is 3:41 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC