Parameters should be able to support these declaratively.
I'm thinking along these lines:
params do
requires :name, :string, only: ~w(john mary)
requires :profession, :string, except: ~w(student engineer)
requires :email, :string, matches: ~r/.+@.+/
end
The best place to introduce this is during the schema definition step.
Parameters should be able to support these declaratively.
I'm thinking along these lines:
The best place to introduce this is during the schema definition step.