This Week's Trending Top

This Month's Trending Top

This Year's Trending Top

endymion
I am wondering why when I ran Ecto.Changeset.apply_changes(changeset) the prepared changes function on that changeset did not run. I have...
New

Last Three Year's Trending Top

vfsoraki
I am currently using the following snippet to do it old_value = cs |> Map.get(:data, %{}) |> Map.get(field, ...
New
thousandsofthem
How exactly i can add an error into nested/embedded changeset? Don’t think add_error can do this. Context: regular changeset validation ...
New
artem
Hi all Context: external system with inconsistent, but feature-full API We use an external SaaS system for hiring people. There are can...
New
chrisdel101
I want to check if my changeset has changes in a true/false way. changset.changes returns %{} when empty, which is truthy, but I need tha...
New
PJUllrich
Hey folks, I wondered whether it is possible to update a struct without explicitly defining the attributes that were updated. So, someth...
New
endymion
I have question on the limitations of embeds_many. I want non-homogenous embeds many. Despite being able to define how to handle casting...
New
stiang
I have a “smart” put function that takes care of saving (creating or updating) a resource and all its sub resources automatically. It wor...
New

Trending Over Three Years Top

fireproofsocks
I’m using changesets to validate various API submissions and I’m wondering if someone has come up with an easy way to format the errors? ...
New
wfgilman
I'm having trouble understanding the difference between cast_assoc, assoc_constraint and foreign_key_constraint in a changeset. More spec...
New
ryanwinchester
In Ecto.Changeset — Ecto v3.11.1 there is a part which says: The :delete option in particular must be used carefully as it would allow ...
New
hariharasudhan94
How can i add changeset errors from Controller when i am trying to add error like follow Ecto.Changeset.add_error(changeset, :old_pass...
New
Eiji
When I'm creating Post insert changeset from iex: new_post = %MyProject.Post{} changeset = Ecto.Changeset.cast(new_post, %{body: "Bod...
New
jdobrzanski
My question is around Ecto.Changeset and the need to validate entire models, not just the passed in params. Basically, I’ve found a use...
New
wmnnd
Hi there, I’m trying to capture constraint exceptions when a user attempts to create a database record with a primary key that already ...
New
dimitarvp
Hello, I am trying to cast data for which I specify types dynamically at runtime. In my particular case I’d like to validate that a sing...
New
CheersThankYou
I have an embedded schema, and I noticed that it was always writing to the DB, even when it wasn’t updated from its default value []. Ch...
New
Cmeurer
I am trying to update a changeset from an invalid set of changes to a valid set, but the errors do not reflect the change. The following ...
New
fireproofsocks
I’m working on a table to store shipping addresses. I would like to add a fingerprint of each address so that I can more easily tell whe...
New
al2o3cr
Question / comment / maybe bug report I was surprised that this didn’t work: def validate_not_cleared(changeset) do validate_change(c...
New
dorian-marchal
With these modules: defmodule Foo do use Ecto.Schema import Ecto.Changeset schema "foo" do field(:name, :string, null: false)...
New
thojanssens1
From Programming Ecto’s book: def new(conn, _params) do changeset = User.changeset(%User{}, %{}) render(conn, changeset: changeset) ...
New
1player
In my CRUD app I would like to add a duplicate feature, in which an existing object’s data is used to prepopulate the form. The naive way...
New
  • Follow
  • Join
  • Shape
the conversation

Latest on Elixir Forum

Elixir Forum

Similar Portals

    None added yet

We're in Beta

About us Mission Statement