Mission 11: Secure Data Transmission
The emergency contact form is allowing blank submissions, causing data corruption.
00:00
Mission Objective
Enforce a rule that the contact name field cannot be empty.
Step 1 / 1
System Briefing: Data Integrity
Corrupted or incomplete data transmissions can be disastrous. HTML provides built-in browser-level validation to ensure the data operators submit is in the correct format before it's even sent to the central system.
Validation Attributes
required: A boolean attribute specifying that an input field must be filled out before submitting the form.minlengthandmaxlength: Specify the minimum and maximum length of text data.minandmax: Specify the minimum and maximum values for an input of typenumber.type: Using specific types likeemailorurlprovides built-in validation for those formats.pattern: Specifies a regular expression that the input's value must match.