✔️ JSON Schemamedium
11. Validate a string format (email)
Write a schema for an object with a required "email" that is a string in valid EMAIL format, and an optional "website" that is a string in valid URI format. Reject a malformed email and a malformed URL.
How to approach this
The "format" keyword validates a string against a named format — "email", "uri", "date", "ipv4", "uuid", and more — without you writing the regex. Add "type": "string" plus "format": "email". (Format checking is on by default in this validator; note some setups treat "format" as advisory, so in production confirm it's enforced.)
schema.json