The template fields represent a sterner test. The checker and generators fields will require us to validate lists and functions. Still, our simple framework that’s based on composition will make quick work of them.

Declaring the main module and core functions

Let’s start with the basic errors function that composes validations over each field. As before, we’ll enumerate required and optional fields, in lib/mastery/boundary/template_validator.ex, like this:

Get hands-on with 1400+ tech skills courses.