Validating input data in flash

Posted by / 08-Jan-2018 03:34

Well, I'm sorry if I got each and every person confused about data validation, but actually, this question was raised because of my Data Structures and Algorithms lecturer.She didn't teach us nuts about validation, and she comes to class saying that we all have to do "data validation for input".Reject input whose first 3 digits after substitutions is a Canadian or Mexican area code.Note that this code requires modification when a new non-USA area code is assigned. User inputs: 12145551212 Extension 234 Well, I'm sorry if I got each and every person confused about data validation, but actually, this question was raised because of my Data Structures and Algorithms lecturer.

Really, all it means is that you must write code to make sure the data is valid (reasonable, within specifications, etc.) before you use it.

Try 1: A valid telephone number consists only of digits.

User inputs: 1-800-555-1212 Try 2: A valid telephone number consists only of digits after removing the characters -, (, ), and blanks.

Suppose you're calculating the average number of bus riders per run.

You know that the number on a given run can't be less than zero, and you know that the bus holds only 66 riders.

validating input data in flash-49validating input data in flash-39validating input data in flash-41

If the input is 11 digits and the first digit is a 1, remove it.

One thought on “validating input data in flash”