Design Patterns · Senior · Question 57 of 75

What does "parse, don't validate" mean?

Explanation

A validator returning boolean loses information; a parser returning Email or an error keeps the proof in the type.

Further reading

Problem with a question

Design Patterns · Senior · question 57

Test yourself

Take the Design Patterns · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz