Hi @benwilson512 sorry for the ambiguity, I’ll try my best to clarify.
My knowledge on Phoenix is as much as the first chapter on Phoenix Framework by Pragmatic studio
This is my registration process:
defmodule CompoCenter.Accounts.User do
...
def changeset(user, attrs) do
user
|> cast(attrs, [:email, :company, :first_name, :last_name])
|> validate_required([:email, :company, :first_name, :last_name])
|> validate_format(:email, ~r/@/)
end
def registration_changeset(user, params) do
user
|> changeset(params)
|> cast(params, [:password])
|> validate_required([:password])
|> validate_length(:password, min: 6, max: 100)
|> put_pass_hash()
end
...
end
So so far as long as the user fill out their email with an @
symbol as well as complying with password length rule, the user will be inserted into the Repo.
And I want to have it differently, I want to have an admin(or me) to go through a review of their input, once I click approve, then will it be created.
If this is still too vague, can you point me to what topics should I explore? I am pretty much in the fog too. But I’m sure there’re websites like this. For example, you submit a registration form to create an account on a website, and the website responded with “Thank you for your submission, your account will need to be approved, which might take a few days.” Or something like that.
Yeah I think my question contains too many topics, if you can give me some pointer to what should I read I’ll greatly appreciate it.