The format tag does not work with required: true on strings.
Notably, if you use format:email and the email field is optional, the validation will fail since an empty string does not pass the format check.
One workaround I've found is to use the pattern tag instead where you can set a regex which also lets empty strings through.
Is there a better way around this?