input_with_wrong_types = %{id: "1231", email: 12312, password: 32_423_423}
input_with_wrong_types
|> Justify.validate_required([:id, :email, :password])
|> Justify.validate_type(:id, :non_neg_integer)
|> Justify.validate_type(:email, :string)
|> Justify.validate_type(:password, :string)
|> Justify.validate_length(:email, min: 2)
By building a pipeline like so the validation will break with Error on validate_length stage, but we do expect to get a struct to parse the error later the same way as ecto changesets do, so the struct should be back on validate_type stage.
Hello,
By building a pipeline like so the validation will break with Error on validate_length stage, but we do expect to get a struct to parse the error later the same way as ecto changesets do, so the struct should be back on validate_type stage.