# Programming Phoenix LiveView vP1.1 (Page 146)

**URL:** <https://forum.devtalk.com/t/programming-phoenix-liveview-vp1-1-page-146/241388>\
**Category:** PragProg Customers\
**Tags:** book-programming-phoenix-liveview, question\
**Created:** [15 April 2026 17:05 UTC](https://forum.devtalk.com/t/programming-phoenix-liveview-vp1-1-page-146/241388 "2026-04-15T17:05:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kjoehlers](https://forum.devtalk.com/user_avatar/forum.devtalk.com/kjoehlers/32/7994_2.png) [@kjoehlers](https://forum.devtalk.com/u/kjoehlers)\
**Post date:** [15 April 2026 17:05 UTC](https://forum.devtalk.com/t/programming-phoenix-liveview-vp1-1-page-146/241388/1 "2026-04-15T17:05:59Z")

</div>

Describing changeset/2 on page 146…  
def changeset(recipient, attrs) do  
recipient  
|\> cast(attrs, [:first\_name, :email])  
|\> validate\_required([:first\_name, :email])  
|\> validate\_format(:email, ~r/@/)  
end

Our changeset/2 function takes in a first argument of any Promo.Recipient struct,  
pattern matched using the **MODULE** macro, which evaluates to the name of  
the current module. It takes in a second argument of an attrs map.

I unserstand what the **MODULE** macro does - where is it in the changeset function definition, or is it implied?
