This Week's Trending
This Month's Trending
This Year's Trending
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
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
I am currently using the following snippet to do it
old_value =
cs
|> Map.get(:data, %{})
|> Map.get(field, ...
New
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
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
How exactly i can add an error into nested/embedded changeset? Don’t think add_error can do this.
Context: regular changeset validation ...
New
Hi all
Context: external system with inconsistent, but feature-full API
We use an external SaaS system for hiring people. There are can...
New
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
Hey folks,
I wondered whether it is possible to update a struct without explicitly defining the attributes that were updated. So, someth...
New
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
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
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
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
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
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
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
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
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
I'm having trouble understanding the difference between cast_assoc, assoc_constraint and foreign_key_constraint in a changeset. More spec...
New
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
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
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
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
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
Here is an example of a custom validation:
@our_url "https://our-bucket.s3.amazon.com"
def changeset(struct, params \\ %{}) do
struct
...
New
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
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
When I'm creating Post insert changeset from iex:
new_post = %MyProject.Post{}
changeset = Ecto.Changeset.cast(new_post, %{body: "Bod...
New
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
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
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
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
Latest on Elixir Forum
Get money off!
The Pragmatic Bookshelf
35% off any eBook
Manning Publications
45% off any item
ElixirCasts
10% off for life
The Pragmatic Studio
20% off any course
AppSignal
10% off for 12 months
Honeybadger
10% off for 12 months
Simply use coupon code "devtalk.com" or "elixirforum" at checkout!
Filter by Type:
Sub Categories:
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #exunit
- #elixirconf
- #discussion
- #javascript
- #podcasts
- #code-sync
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #api
- #processes
- #forms
- #metaprogramming
- #security
- #performance
- #hex







