Use it when gating automation around Input Validation. Keep authoritative criteria, immutable source/input, exact target identity, validator version, observed/effective state and workload acceptance as separate proof boundaries.
Input Validation · Validation
Input Validation rejects malformed, out-of-range, ambiguous or unauthorized automation inputs before they can influence control flow or target state.
1. Validate inputs before anything else.
2. Types, ranges, formats, allowlists.
3. Reject unknown fields.
4. Clear errors.
5. Test with invalid inputs.
input → validation → accept/reject
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
jq empty <input.json>Primary Commands
Configuration and operational commands for this Topic.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
caller/raw input → decoding/normalization → type/format/range → cross-field semantics → authorization/policy → effective validated input → execution handoff
Healthy evidence: invalid or ambiguous inputs fail before mutation, effective values are reproducible and secrets remain protected.
Step 2 Command read-back and what it shows Verify boundary
Verification for Validation → Input Validation must distinguish state, not merely report that a command ran. With jq empty <input.json>, known-good means valid examples are accepted after normalization, invalid/boundary/adversarial cases are rejected with deterministic errors, and no rejected input reaches a mutating downstream operation; known-broken/suspicious means malformed or out-of-range values are accepted, valid boundary cases are incorrectly rejected, normalization changes meaning unexpectedly or validation occurs only after downstream mutation. python -m json.tool <file> shows JSON syntax parseability only, but it does not show schema, range, trust, authorization or semantic safety.
Step 3 Common mistakes Verify boundary
- Only client-side validation.
Step 4 Failure modes and next checks Narrow the fault
Suspicious evidence: implicit coercion, permissive unknown fields, hidden defaults or secret-bearing logs make accepted input differ from operator intent.
Input Validation shows conformity to the declared input contract only; downstream authorization, command safety, target capability and workload outcome require separate evidence.
Step 5 Observation-driven branch and next-check logic Narrow the fault
When Validation → Input Validation fails, reproduce the smallest original case and capture jq empty <input.json> before mutation. Use the observation to choose the next check: if input cannot parse, reject before any downstream call; if parse succeeds but type/range/schema fails, return a bounded validation error; if structure is valid but semantic/reference constraint fails, verify authoritative relationship before accepting.
Step 6 Where it fails Narrow the fault
Trace a failure along the path it takes: input/artifact → parser/schema → semantic/policy checks → acceptance decision → automation action → post-change state verification.
Where Input Validation usually goes wrong: full-resource replacement semantics, idempotency, conditional updates and omitted-field consequences; schema/type/range validation, trust boundary, fail-closed behavior and diagnostic precision.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Input parsed ≠ input semantically valid.
- Type-valid input ≠ authorized input.
- Default applied ≠ caller intent preserved.
- Sanitized input ≠ safe downstream command or query automatically.
- Schema/type checks on inputs — structure
- Allowlists and ranges — values
- Reject unknown fields — strictness
ReferenceWhat it is1 section · depth on demand
Core model
Resolve the expected input contract, normalize only where intentional, enforce type/range/enum/format and cross-field constraints, reject unknown or dangerous values, then preserve the effective validated values without exposing secrets.
ReferenceHow it works2 sections · depth on demand
How it works
Validation → Input Validation should be reasoned about as a state pipeline, not as one command outcome. The responsible state is untrusted or user-supplied input, its expected type/shape/range/encoding and the normalization boundary before data is accepted by automation logic. Input validation rejects malformed or out-of-policy values before they influence command construction, API requests or state changes; parsing is only the first layer before schema and semantic constraints; meanwhile locale/encoding, defaults, secret handling, cross-field relationships and authoritative lookups are separate dependencies. This distinction is especially important because parseable JSON can still be dangerous or semantically invalid, while overly strict validation can reject legitimate values and become an availability problem.
In depth
In the validation stage, input validation rejects bad parameters before a job does anything: wrong types, out-of-range values, unknown targets or dangerous combinations.
from pydantic import BaseModel, Field, IPvAnyAddress
class VlanRequest(BaseModel):
vlan_id: int = Field(ge=2, le=4094)
name: str = Field(pattern=r"^[a-z0-9-]{1,32}$")
gateway: IPvAnyAddress
req = VlanRequest(**payload) # raises ValidationError with details
Return every validation error at once rather than one per run, so the requester can fix them together.
ReferenceImportant terms & boundaries2 sections · depth on demand
What this shows and what it does not
Input Validation owns the generic ingress contract; API, script, template and platform branches own their specific parameter semantics and trust models.
Mechanics
Validation → Input Validation is owned at runtime by the validator/schema/policy engine plus the automation workflow that gates a change based on validation results.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Validation > Input Validation. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://json-schema.org/learn/getting-started-step-by-step · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Input Validation validation proof-boundary map
Fast criteria/scope, execution and effective-outcome proof boundaries for Input Validation.
| Boundary | Healthy evidence | Suspicious evidence |
|---|---|---|
| Criteria / input | Criteria, source revision, validator and exact target identity are explicit | A generic pass exists without versioned criteria or target correlation |
| Preconditions / operation | Current authoritative facts are bound to the exact operation | Stale preflight or requested state substitutes for execution-time facts |
| Effective outcome | Authoritative state/read-back and service-relevant evidence match the expected result | Tool/test/validator success substitutes for effective target or workload proof |
| Limits / next action | Coverage limits, unknowns and failures drive the next narrower check | Unknown evidence becomes pass, retries hide failures or broad success is inferred from one check |
Deep reference
Healthy vs suspicious evidence
Output interpretation
For Input Validation, rely on structured fields and stable IDs (full-resource replacement semantics, idempotency, conditional updates and omitted-field consequences; schema/type/range validation, trust boundary, fail-closed behavior and diagnostic precision) rather than text formatted for display.