<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="361502" data-post-id="361502">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="itzmidinesh" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/itzmidinesh/120/34350_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  itzmidinesh
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I tried passing <code>meta.errors</code> to the <code>translate_error/1</code> function, but it doesn’t seem to work. I’m following the approach shown in the documentation for handling filters. Am I missing something?</p>
<p>Do I need to implement this manually, or is there a built-in way to pass <code>meta.errors</code> to a function and get an error structure similar to an Ecto changeset?</p>
<p>Here’s my current <code>translate_error/1</code> function:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defp translate_error({msg, opts}) do
  Enum.reduce(opts, msg, fn {key, value}, acc -&gt;
    String.replace(acc, "%{#{key}}", fn _ -&gt; to_string(value) end)
  end)
end
</code></pre>
<p>Would appreciate any guidance on this!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="361502" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/flop-filtering-sorting-and-pagination-for-ecto/51750/43">Post #42</a>
	                </div>
	            </div>
              <div id="likers-container-361502" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="361502"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #42"></div>
  </section>
</div>
    <div class="postbit" id="361518" data-post-id="361518">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="woylie" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/woylie/120/38856_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  woylie
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Check the <code>translate_errors</code> function that I linked. It calls <code>translate_error</code> on each error on the given field. You’ll need to do something like that, but recursively call <code>translate_error</code> on all fields.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="361518" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/flop-filtering-sorting-and-pagination-for-ecto/51750/44">Post #43</a>
	                </div>
	            </div>
              <div id="likers-container-361518" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="361518"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #43"></div>
  </section>
</div>
    <div class="postbit" id="361538" data-post-id="361538">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="itzmidinesh" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/itzmidinesh/120/34350_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  itzmidinesh
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Understood. Thank you!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="361538" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/flop-filtering-sorting-and-pagination-for-ecto/51750/45">Post #44</a>
	                </div>
	            </div>
              <div id="likers-container-361538" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="361538"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #44"></div>
  </section>
</div>
    <div class="postbit" id="389867" data-post-id="389867">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="woylie" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/woylie/120/38856_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  woylie
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I just released 0.26.4 with <code>starts_with</code> and <code>ends_with</code> operators and a bunch fixes, including fixing some compile-time warnings in Elixir 1.20.</p>
<aside class="onebox allowlistedgeneric" data-onebox-src="https://github.com/woylie/flop/releases/tag/0.26.4">
  <header class="source">
      <img src="https://github.githubassets.com/favicons/favicon.svg" class="site-icon" alt="" width="32" height="32">

      <a href="https://github.com/woylie/flop/releases/tag/0.26.4" target="_blank" rel="noopener nofollow ugc">GitHub</a>
  </header>

  <article class="onebox-body">
    <div class="aspect-image" style="--aspect-ratio:690/344;"><img src="https://opengraph.githubassets.com/66ed3ff6c4bb87b82479774c818d3e32b5602a3e7dd9b729f049ca1c79bec996/woylie/flop/releases/tag/0.26.4" class="thumbnail" alt="" width="690" height="345"></div>

<h3><a href="https://github.com/woylie/flop/releases/tag/0.26.4" target="_blank" rel="noopener nofollow ugc">Release 0.26.4 · woylie/flop</a></h3>

  <p>Added

starts_with and ends_with filter operators.

Fixed

Allow overriding the global default_limit by setting default_limit: false
in the schema.
Remove malformed filters if replace_invalid_param...</p>


  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>
 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="389867" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/flop-filtering-sorting-and-pagination-for-ecto/51750/46">Post #45</a>
	                </div>
	            </div>
              <div id="likers-container-389867" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="389867"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #45"></div>
  </section>
</div>
    <div class="postbit" id="392631" data-post-id="392631">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="woylie" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/woylie/120/38856_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  woylie
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Flop 0.26.5 fixes validation if a cursor is passed with incompatible types.</p>
<aside class="onebox allowlistedgeneric" data-onebox-src="https://github.com/woylie/flop/releases/tag/0.26.5">
  <header class="source">
      <img src="https://github.githubassets.com/favicons/favicon.svg" class="site-icon" alt="" width="32" height="32">

      <a href="https://github.com/woylie/flop/releases/tag/0.26.5" target="_blank" rel="noopener nofollow ugc">GitHub</a>
  </header>

  <article class="onebox-body">
    <div class="aspect-image" style="--aspect-ratio:690/344;"><img src="https://opengraph.githubassets.com/272592da96ab860e609a71933cc2d6f42a6ab35bbf99cf762620d6cc3bb3adbe/woylie/flop/releases/tag/0.26.5" class="thumbnail" alt="" width="690" height="345"></div>

<h3><a href="https://github.com/woylie/flop/releases/tag/0.26.5" target="_blank" rel="noopener nofollow ugc">Release 0.26.5 · woylie/flop</a></h3>

  <p>Fixed

Validate cursor values against the Ecto types of the order_by fields.
Cursors with incompatible value types used to pass validation and cause an
Ecto.Query.CastError when the query was run. ...</p>


  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>

<p>Flop 0.26.6 is a security release that adds a maximum size for pagination cursors and rejects compressed cursors before decoding them.</p>
<aside class="onebox allowlistedgeneric" data-onebox-src="https://github.com/woylie/flop/releases/tag/0.26.6">
  <header class="source">
      <img src="https://github.githubassets.com/favicons/favicon.svg" class="site-icon" alt="" width="32" height="32">

      <a href="https://github.com/woylie/flop/releases/tag/0.26.6" target="_blank" rel="noopener nofollow ugc">GitHub</a>
  </header>

  <article class="onebox-body">
    <div class="aspect-image" style="--aspect-ratio:690/344;"><img src="https://opengraph.githubassets.com/188e8b3e4f5f352f1e7a4f4ee64a63eec5eff042ec0f7a2d4c8efb74c3d86e6c/woylie/flop/releases/tag/0.26.6" class="thumbnail" alt="" width="690" height="345"></div>

<h3><a href="https://github.com/woylie/flop/releases/tag/0.26.6" target="_blank" rel="noopener nofollow ugc">Release 0.26.6 · woylie/flop</a></h3>

  <p>Fixed

Reject pagination cursors larger than 8 KB and cursors that contain a
compressed Erlang term before decoding them. The maximum cursor size is
configurable.
Cast filter values as strings for ...</p>


  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>

<p>Flop 0.27.0 contains several bug fixes and improved error messages, as well as an option to set a maximum filter count (defaults to 20).</p>
<aside class="onebox allowlistedgeneric" data-onebox-src="https://github.com/woylie/flop/releases/tag/0.27.0">
  <header class="source">
      <img src="https://github.githubassets.com/favicons/favicon.svg" class="site-icon" alt="" width="32" height="32">

      <a href="https://github.com/woylie/flop/releases/tag/0.27.0" target="_blank" rel="noopener nofollow ugc">GitHub</a>
  </header>

  <article class="onebox-body">
    <div class="aspect-image" style="--aspect-ratio:690/344;"><img src="https://opengraph.githubassets.com/36c59a4a7a7700ed04aea07291b9220a016cec8df36c0bc03bf6ed61ce4e6201/woylie/flop/releases/tag/0.27.0" class="thumbnail" alt="" width="690" height="345"></div>

<h3><a href="https://github.com/woylie/flop/releases/tag/0.27.0" target="_blank" rel="noopener nofollow ugc">Release 0.27.0 · woylie/flop</a></h3>

  <p>Changed

Require the ecto_type option for join fields and custom fields.
Raise a Flop.UnknownFieldError instead of a FunctionClauseError when
Flop.Schema.field_info/2, Flop.Schema.get_field/2 or
Fl...</p>


  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>
 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="392631" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/flop-filtering-sorting-and-pagination-for-ecto/51750/47">Post #46</a>
	                </div>
	            </div>
              <div id="likers-container-392631" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="392631"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>