add deletion check for containers
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is failing
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	continuous-integration/drone/push Build is failing
				
			This commit is contained in:
		| @@ -55,9 +55,10 @@ defmodule CanneryWeb.ErrorHelpers do | ||||
|   end | ||||
|  | ||||
|   @doc """ | ||||
|   Displays all errors from a changeset | ||||
|   Displays all errors from a changeset, or just for a single key | ||||
|   """ | ||||
|   @spec changeset_errors(Changeset.t()) :: String.t() | ||||
|   @spec changeset_errors(Changeset.t(), key :: atom()) :: [String.t()] | nil | ||||
|   def changeset_errors(changeset) do | ||||
|     changeset | ||||
|     |> changeset_error_map() | ||||
| @@ -66,6 +67,10 @@ defmodule CanneryWeb.ErrorHelpers do | ||||
|     end) | ||||
|   end | ||||
|  | ||||
|   def changeset_errors(changeset, key) do | ||||
|     changeset |> changeset_error_map() |> Map.get(key) | ||||
|   end | ||||
|  | ||||
|   @doc """ | ||||
|   Displays all errors from a changeset in a key value map | ||||
|   """ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user