Input validation applies to raw data and metadata, including strings, numbers, parameters, file contents, headers, and sizes. Validation may need to establish size and range limits, indexes and offsets, symbolic keys, syntax and lexical correctness, data type, consistency between related values, conformance to business rules, equivalence, and authenticity or ownership claims.
The data may be simple or deeply structured, with nested combinations of metadata and raw values. Properties that are implied or derived by the application must also be calculated correctly. Validation failures can occur when developers trust client-side checks, cookies, hidden fields, or other inputs that an attacker can modify, or when validation is incomplete, occurs before data from multiple sources is combined, or is bypassed through decoding and representation differences.