improve changeset errors
This commit is contained in:
		| @@ -5,7 +5,7 @@ | ||||
|  | ||||
|   <%= form_for @changeset, Routes.user_registration_path(@conn, :create), | ||||
|     [class: "flex flex-col justify-center items-center space-y-4"], fn f -> %> | ||||
|     <%= if @changeset.action do %> | ||||
|     <%= if @changeset.action && not(@changeset.valid?) do %> | ||||
|       <div class="alert alert-danger"> | ||||
|         <p>Oops, something went wrong! Please check the errors below.</p> | ||||
|       </div> | ||||
|   | ||||
| @@ -5,7 +5,7 @@ | ||||
|  | ||||
|   <%= form_for @changeset, Routes.user_reset_password_path(@conn, :update, @token), | ||||
|     [class: "flex flex-col justify-center items-center space-y-4"], fn f -> %> | ||||
|     <%= if @changeset.action do %> | ||||
|     <%= if @changeset.action && not(@changeset.valid?) do %> | ||||
|       <div class="alert alert-danger"> | ||||
|         <p>Oops, something went wrong! Please check the errors below.</p> | ||||
|       </div> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user