In the Schemas section, we defined the Accounts.User schema with a virtual password field. This is useful whenever you want your schema to have a field but you don't want it to be persisted.
We never want to store user passwords in plain text. The idea here is to temporarily place the plain text password on this password field, which will be then hashed and inserted as the value of the hashed_password field in the last step of our User.create_changeset/2 function:
$ cat apps/elixir_drip/lib/elixir_drip/accounts/user.exdefmodule ElixirDrip.Accounts.User do # ... @email_regex ~r/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i def create_changeset(%User{} = user, attrs) do user |> cast(attrs, [:username, :password, :email]) |> validate_required([:username, ...