You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Often times, users want to conditionally decide to show errors, or modify them in some way. We have transform_errors, which gives you the Ash error struct, like %Ash.Error.Changes.InvalidChanges{}, but that can be annoying because you have to handle the conversion to to the triple, i.e {:field, "message", vars: []} before doing any work. So we should add an option that takes a callback like so:
# (can path be gotten from the form instead?)post_process_errors: fnform,path_to_form,{field,message,vars}-># you could for example filter certain errors out# maybe using Phoenix.used_input?(form.raw_params, field)# or other custom criteria# or remap the field name from one thing to anotherend
The text was updated successfully, but these errors were encountered:
Often times, users want to conditionally decide to show errors, or modify them in some way. We have
transform_errors
, which gives you the Ash error struct, like%Ash.Error.Changes.InvalidChanges{}
, but that can be annoying because you have to handle the conversion to to the triple, i.e{:field, "message", vars: []}
before doing any work. So we should add an option that takes a callback like so:The text was updated successfully, but these errors were encountered: