Knowledge (XXG)

Data validation

Source 📝

468: 32: 547:
a different way of formatting that address or suggests a different address altogether). You would want in this case, to give the user the option of accepting the recommendation or keeping their version. This is not a strict validation process, by design and is useful for capturing addresses to a new location or to a location that is not yet supported by the validation databases.
152:, that is, that they are both correct and useful. It uses routines, often called "validation rules", "validation constraints", or "check routines", that check for correctness, meaningfulness, and security of data that are input to the system. The rules may be implemented through the automated facilities of a 537:
Advisory actions typically allow data to be entered unchanged but sends a message to the source actor indicating those validation issues that were encountered. This is most suitable for non-interactive system, for systems where the change is not business critical, for cleansing steps of existing data
528:
Another form of enforcement action involves automatically changing the data and saving a conformant version instead of the original version. This is most suitable for cosmetic change. For example, converting an entry to a entry does not need user input. An inappropriate use of automatic enforcement
524:
Enforcement action typically rejects the data entry request and requires the input actor to make a change that brings the data into compliance. This is most suitable for interactive use, where a real person is sitting on the computer and making entry. It also works well for batch upload, where a file
546:
Verification actions are special cases of advisory actions. In this case, the source actor is asked to verify that this data is what they would really want to enter, in the light of a suggestion to the contrary. Here, the check step suggests an alternative (e.g., a check of a mailing address returns
379:
Compares data in different systems to ensure it is consistent. Systems may represent the same data differently, in which case comparison requires transformation (e.g., one system may store customer name in a single Name field as 'Doe, John Q', while another uses First_Name 'John' and Last_Name 'Doe'
248:
Simple range and constraint validation may examine input for consistency with a minimum/maximum range, or consistency with a test for evaluating a sequence of characters, such as one or more tests against regular expressions. For example, a counter value may be required to be a non-negative integer,
354:
Checks that record has a valid number of related records. For example, if a contact record is classified as "customer" then it must have at least one associated order (cardinality > 0). This type of rule can be complicated by additional conditions. For example, if a contact record in a payroll
257:
Code and cross-reference validation includes operations to verify that data is consistent with one or more possibly-external rules, requirements, or collections relevant to a particular organization, context or set of underlying assumptions. These additional validity constraints may involve
428:
Values in two relational database tables can be linked through foreign key and primary key. If values in the foreign key field are not constrained by internal mechanisms, then they should be validated to ensure that the referencing table always refers to a row in the referenced
236:
The simplest kind of data type validation verifies that the individual characters provided through user input are consistent with the expected characters of one or more known primitive data types as defined in a programming language or data storage and retrieval mechanism.
273:
Structured validation allows for the combination of other kinds of validation, along with more complex processing. Such complex processing may include the testing of conditional constraints for an entire complex data object or set of process operations within a system.
328:
Checks to ascertain that only expected characters are present in a field. For example a numeric field may only allow the digits 0–9, the decimal point and perhaps a minus sign or commas. A text field such as a personal name might disallow characters used for
555:
Even in cases where data validation did not find any issues, providing a log of validations that were conducted and their results is important. This is helpful to identify any missing data validation checks in light of data issues and in improving the
196:
The guarantees of data validation do not necessarily include accuracy, and it is possible for data entry errors such as misspellings to be accepted as valid. Other clerical and/or computer controls may be applied to reduce inaccuracy within a system.
529:
would be in situations where the enforcement leads to loss of business information. For example, saving a truncated comment if the length is longer than expected. This is not typically a good thing since it may result in loss of significant data.
345:
Checks for missing records. Numerical fields may be added together for all records in a batch. The batch total is entered and the computer checks that the total is correct, e.g., add the 'Total Cost' field of a number of transactions
311:. To detect transcription errors in which digits have been altered or transposed, the last digit of a pre-2007 ISBN must match the result of a mathematical formula incorporating the other 9 digits ( 179:
in an application or automated system. Data validation rules can be defined and designed using various methodologies, and be deployed in various contexts. Their implementation can use
205:
In evaluating the basics of data validation, generalizations can be made regarding the different kinds of validation according to their scope, complexity, and purpose.
404:
Checks that the data is in a specified format (template), e.g., dates have to be in the format YYYY-MM-DD. Regular expressions may be used for this kind of validation.
645: 282:
Consistency validation ensures that data is logical. For example, the delivery date of an order can be prohibited from preceding its shipment date.
668: 611: 355:
database is classified as "former employee" then it must not have any associated salary payments after the separation date (cardinality = 0).
312: 692: 507: 115: 363:
Used for numerical data. To support error detection, an extra digit is added to a number which is calculated from the other digits.
485: 49: 570: 96: 720: 489: 371:
Checks fields to ensure data in these fields correspond, e.g., if expiration date is in the past then status is not "active".
53: 68: 638: 573:. Data validation checks that data are fit for purpose, valid, sensible, reasonable and secure before they are processed. 75: 592: 388:
Checks input conformance with typed data. For example, an input box accepting numeric data may reject the letter 'O'.
478: 167:, which attempts to prove or disprove the correctness of algorithms for implementing a specification or property. 42: 82: 20: 1002: 804: 800: 445:
Checks that each value is unique. This can be applied to several fields (i.e. Address, First Name, Last Name).
396:
Checks that a file with a specified name exists. This check is essential for programs that use file handling.
301:
Format checks. Each of the first 9 digits must be 0 through 9, and the 10th must be either 0 through 9 or an
729: 180: 64: 298:
Size. A pre-2007 ISBN must consist of 10 digits, with optional hyphens or spaces separating its four parts.
1007: 831: 187: 249:
and a password may be required to meet a minimum length and contain characters from multiple categories.
1012: 420:
Checks that the data is within a specified range of values, e.g., a probability must be between 0 and 1.
525:
input may be rejected and a set of messages sent back to the input source for why the data is rejected.
265:
For example, a user-provided country code might be required to identify a current geopolitical region.
961: 258:
cross-referencing supplied data with a known look-up table or directory information service such as
901: 886: 814: 164: 157: 713: 334: 622: 891: 881: 745: 587: 89: 841: 790: 775: 755: 740: 333:. An e-mail address might require at least one @ sign and various other structural details. 176: 623:
Data Validation, Data Integrity, Designing Distributed Applications with Visual Studio .NET
906: 896: 866: 809: 780: 770: 642: 582: 566: 330: 153: 981: 976: 941: 921: 916: 871: 846: 765: 190: 183: 175:
Data validation is intended to provide certain well-defined guarantees for fitness and
145: 412:
Checks that data is present, e.g., customers may be required to have an email address.
996: 946: 936: 911: 785: 750: 706: 240:
For example, an integer field may require input to use only characters 0 through 9.
956: 951: 931: 926: 856: 851: 826: 819: 795: 294:(the 2005 edition of ISO 2108 required ISBNs to have 13 digits from 2007 onwards). 233:
Data type validation is customarily carried out on one or more simple data fields.
149: 683: 657: 876: 836: 633: 467: 308: 31: 966: 861: 129: 760: 492: in this section. Unsourced material may be challenged and removed. 453:
A table look up check compares data to a collection of allowed values.
290:
Multiple kinds of data validation are relevant to 10-digit pre-2007
687: 291: 259: 141: 16:
The process of ensuring computer data is both correct and useful
702: 461: 25: 698: 19:"Input validation" redirects here. For other uses, see 635:
Frequently Asked Questions about the new ISBN standard
160:
validation logic of the computer and its application.
565:
Failures or omissions in data validation can lead to
56:. Unsourced material may be challenged and removed. 538:and for verification steps of an entry process. 337:can be effective ways to implement such checks. 714: 8: 669:More Efficient Data Validation with Spotless 721: 707: 699: 437:Looks for spelling and grammatical errors. 508:Learn how and when to remove this message 116:Learn how and when to remove this message 604: 695:, OWASP Cheat Sheet Series, github.com 7: 490:adding citations to reliable sources 218:Code and cross-reference validation; 54:adding citations to reliable sources 612:Methodology for data validation 1.0 156:, or by the inclusion of explicit 14: 244:Simple range and constraint check 466: 215:Range and constraint validation; 30: 477:needs additional citations for 376:Cross-system consistency checks 41:needs additional citations for 253:Code and cross-reference check 1: 593:Verification and validation 380:and Middle_Name 'Quality'). 140:is the process of ensuring 1029: 658:Chapter10. Data Validation 434:Spelling and grammar check 221:Structured validation; and 18: 736: 21:Improper input validation 325:Allowed character checks 561:Validation and security 458:Post-validation actions 571:security vulnerability 224:Consistency validation 163:This is distinct from 425:Referential integrity 212:Data type validation; 148:to confirm they have 902:Protection (privacy) 486:improve this article 393:File existence check 313:ISBN-10 check digits 50:improve this article 543:Verification Action 450:Table look up check 335:Regular expressions 177:consistency of data 165:formal verification 158:application program 641:2007-06-10 at the 521:Enforcement Action 368:Consistency checks 990: 989: 982:Wrangling/munging 832:Format management 588:Data verification 552:Log of validation 518: 517: 510: 351:Cardinality check 278:Consistency check 126: 125: 118: 100: 65:"Data validation" 1020: 723: 716: 709: 700: 693:Input Validation 671: 666: 660: 655: 649: 631: 625: 620: 614: 609: 513: 506: 502: 499: 493: 470: 462: 442:Uniqueness check 385:Data type checks 320:Validation types 269:Structured check 138:input validation 121: 114: 110: 107: 101: 99: 58: 34: 26: 1028: 1027: 1023: 1022: 1021: 1019: 1018: 1017: 1003:Data processing 993: 992: 991: 986: 962:Synchronization 732: 727: 684:Data Validation 680: 675: 674: 667: 663: 656: 652: 643:Wayback Machine 632: 628: 621: 617: 610: 606: 601: 583:Data processing 579: 567:data corruption 563: 534:Advisory Action 514: 503: 497: 494: 483: 471: 460: 322: 288: 280: 271: 255: 246: 231: 229:Data-type check 203: 201:Different kinds 188:procedure-based 173: 154:data dictionary 134:data validation 122: 111: 105: 102: 59: 57: 47: 35: 24: 17: 12: 11: 5: 1026: 1024: 1016: 1015: 1010: 1005: 995: 994: 988: 987: 985: 984: 979: 974: 969: 964: 959: 954: 949: 944: 939: 934: 929: 924: 919: 914: 909: 904: 899: 894: 889: 887:Pre-processing 884: 879: 874: 869: 864: 859: 854: 849: 844: 839: 834: 829: 824: 823: 822: 817: 812: 798: 793: 788: 783: 778: 773: 768: 763: 758: 753: 748: 743: 737: 734: 733: 728: 726: 725: 718: 711: 703: 697: 696: 690: 679: 678:External links 676: 673: 672: 661: 650: 626: 615: 603: 602: 600: 597: 596: 595: 590: 585: 578: 575: 562: 559: 558: 557: 553: 549: 548: 544: 540: 539: 535: 531: 530: 526: 522: 516: 515: 474: 472: 465: 459: 456: 455: 454: 451: 447: 446: 443: 439: 438: 435: 431: 430: 426: 422: 421: 418: 414: 413: 410: 409:Presence check 406: 405: 402: 398: 397: 394: 390: 389: 386: 382: 381: 377: 373: 372: 369: 365: 364: 361: 357: 356: 352: 348: 347: 343: 339: 338: 326: 321: 318: 317: 316: 306: 299: 287: 284: 279: 276: 270: 267: 254: 251: 245: 242: 230: 227: 226: 225: 222: 219: 216: 213: 202: 199: 191:business rules 184:data integrity 172: 169: 146:data cleansing 144:has undergone 124: 123: 38: 36: 29: 15: 13: 10: 9: 6: 4: 3: 2: 1025: 1014: 1011: 1009: 1008:Data security 1006: 1004: 1001: 1000: 998: 983: 980: 978: 975: 973: 970: 968: 965: 963: 960: 958: 955: 953: 950: 948: 945: 943: 940: 938: 935: 933: 930: 928: 925: 923: 920: 918: 915: 913: 910: 908: 905: 903: 900: 898: 895: 893: 890: 888: 885: 883: 880: 878: 875: 873: 870: 868: 865: 863: 860: 858: 855: 853: 850: 848: 845: 843: 840: 838: 835: 833: 830: 828: 825: 821: 818: 816: 813: 811: 808: 807: 806: 802: 799: 797: 794: 792: 789: 787: 784: 782: 779: 777: 774: 772: 769: 767: 764: 762: 759: 757: 754: 752: 749: 747: 744: 742: 739: 738: 735: 731: 724: 719: 717: 712: 710: 705: 704: 701: 694: 691: 689: 685: 682: 681: 677: 670: 665: 662: 659: 654: 651: 647: 644: 640: 637: 636: 630: 627: 624: 619: 616: 613: 608: 605: 598: 594: 591: 589: 586: 584: 581: 580: 576: 574: 572: 568: 560: 554: 551: 550: 545: 542: 541: 536: 533: 532: 527: 523: 520: 519: 512: 509: 501: 491: 487: 481: 480: 475:This section 473: 469: 464: 463: 457: 452: 449: 448: 444: 441: 440: 436: 433: 432: 427: 424: 423: 419: 416: 415: 411: 408: 407: 403: 400: 399: 395: 392: 391: 387: 384: 383: 378: 375: 374: 370: 367: 366: 362: 359: 358: 353: 350: 349: 344: 341: 340: 336: 332: 327: 324: 323: 319: 314: 310: 307: 304: 300: 297: 296: 295: 293: 285: 283: 277: 275: 268: 266: 263: 261: 252: 250: 243: 241: 238: 234: 228: 223: 220: 217: 214: 211: 210: 209: 208:For example: 206: 200: 198: 194: 192: 189: 185: 182: 178: 170: 168: 166: 161: 159: 155: 151: 147: 143: 139: 135: 131: 120: 117: 109: 106:November 2016 98: 95: 91: 88: 84: 81: 77: 74: 70: 67: –  66: 62: 61:Find sources: 55: 51: 45: 44: 39:This article 37: 33: 28: 27: 22: 1013:Data quality 971: 892:Preservation 882:Philanthropy 746:Augmentation 664: 653: 634: 629: 618: 607: 564: 504: 495: 484:Please help 479:verification 476: 401:Format check 360:Check digits 342:Batch totals 302: 289: 281: 272: 264: 256: 247: 239: 235: 232: 207: 204: 195: 174: 162: 150:data quality 137: 133: 127: 112: 103: 93: 86: 79: 72: 60: 48:Please help 43:verification 40: 952:Stewardship 842:Integration 791:Degradation 776:Compression 756:Archaeology 741:Acquisition 556:validation. 417:Range check 309:Check digit 181:declarative 997:Categories 972:Validation 907:Publishing 897:Processing 867:Management 781:Corruption 771:Collection 599:References 186:rules, or 76:newspapers 977:Warehouse 942:Scrubbing 922:Retention 917:Reduction 872:Migration 847:Integrity 815:Transform 766:Cleansing 498:July 2012 346:together. 130:computing 947:Security 937:Scraping 912:Recovery 786:Curation 751:Analysis 639:Archived 577:See also 171:Overview 957:Storage 932:Science 927:Quality 857:Lineage 852:Library 827:Farming 810:Extract 796:Editing 286:Example 90:scholar 877:Mining 837:Fusion 429:table. 331:markup 92:  85:  78:  71:  63:  688:OWASP 569:or a 292:ISBNs 97:JSTOR 83:books 967:Type 862:Loss 820:Load 730:Data 260:LDAP 142:data 69:news 805:ELT 801:ETL 761:Big 646:ISO 488:by 193:. 136:or 128:In 52:by 999:: 686:, 315:). 262:. 132:, 803:/ 722:e 715:t 708:v 648:. 511:) 505:( 500:) 496:( 482:. 305:. 303:X 119:) 113:( 108:) 104:( 94:· 87:· 80:· 73:· 46:. 23:.

Index

Improper input validation

verification
improve this article
adding citations to reliable sources
"Data validation"
news
newspapers
books
scholar
JSTOR
Learn how and when to remove this message
computing
data
data cleansing
data quality
data dictionary
application program
formal verification
consistency of data
declarative
data integrity
procedure-based
business rules
LDAP
ISBNs
Check digit
ISBN-10 check digits
markup
Regular expressions

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.