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
PaleWatcher
Suppose you have two fields in a Phoenix LiveView form where both are user-editable, and each one can be used to calculate the other. Ex...
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
thojanssens1
I have a login page which allows to authenticate an admin. If there are no users at all in the database (first time the app runs), I wil...
New
lucassperez
If I have some fields in one of my database tables that can’t simultaneously have the same values, I would create an index and then put t...
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
zac
I’m trying to figure out how to do this, and have come up with something that may be the completely wrong approach. :slight_smile: Imagi...
New
Awlexus
I’m trying to implement create/update actions where I manually create the changeset for the embed. This is what I currently tried, but th...
New
Awlexus
I’m trying to prevent an attribute from being cast, so I can manipulate it myself, but I can’t figure out how to do it. I tried to set th...
New
Reshuffle6795
Hello! I’m trying to make sure a parameter in my Phoenix changeset can only be set by the server during a POST request. I have a blogs ...
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
neurodynamic
I’ve been trying to use the {msg, opts} tuple variant of the :message option in validate_format, taking a validation that looked like thi...
New
bobmanary
I have a Postgres database with these tables and associations: A has many B, B has zero or one C, C has many D. I have a form that mana...
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
acrolink
I have a special need to set the id of newly created entities to some integer relating to UNIX timestamp (not autoincrement based). Any i...
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
clawblue
Hey all! New to Elixir - I’m trying to edit an entry in postgresql, and I can’t see what I’m doing wrong - I keep getting this error when...
New
Francesco
Hello! I have a user table where I don’t allow two verified users with the same email to exist. This is enforced by a unique constraint ...
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
acrolink
Here is an example of a custom validation: @our_url "https://our-bucket.s3.amazon.com" def changeset(struct, params \\ %{}) do struct ...
New
helicon
Hello! I have 2 schemas: Asset and File. # asset schema has_many :files, File # file schema belongs_to :asset, Asset So it looks like...
New
peck
Hi all, I’ve been building a out a multi-step join/checkout flow and I’m liking the results. I used https://www.markusbodner.com/2019/05...
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
Qqwy
Hello Everyone, I am working on a small Phoenix/Ecto project. One of the features of this application is going to be that people can up...
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
  • Follow
  • Join
  • Shape
the conversation

Latest on Elixir Forum

Elixir Forum

Similar Portals

    None added yet

We're in Beta

About us Mission Statement