Programming Phoenix LiveView B10.0: Mentioned validate/2 function should be validate_required/2 (page 130)

This paragraph mentions three functions that ensure data consistency:

Finally, the validate/2, unique_constraint/2, and validate_number/2 functions validate the inbound data, ensuring consistency.

In the code shown earlier on the page, the first data consistency function is validate_required/2, not validate/2.

def changeset(product, attrs) do
product
|> cast(attrs, [:name, :description, :unit_price, :sku])
|> validate_required([:name, :description, :unit_price, :sku])
|> unique_constraint(:sku)
|> validate_number(:unit_price, greater_than: 0.0)
end