Two classes of validators:
- Required (empty/non-empty) validation
- Format validation (phone number, zip/postal code, etc)
Don’t show both a required error and a format error at the same time. In other words, format validation errors are NOT shown for empty fields (doesn’t matter if they are required or not).
Pseudocode for an isValid method: