Hi Team How to make a form validation when the value being entered already exist in the database? Show validation error that says “Value already exist”. Thanks in advance!
Which database are you using? In its schema, you should enforce the value uniqueness, so the insertion would fail if you try to insert some existing value.
Other than that, before inserting you could query the data source to check if that element exists. If it does, you can show the error. Otherwise, you continue with the insertion.
Hi @tiago I’m using Supabase but I disabled RLS for now. How do we handle backend failure in Plasmic App?
Hi Joey! You can use the result of previous steps in interactions actions. They are available as $steps. So if you can read the backend failure from that variable and act accordingly