style: format codebase
This commit is contained in:
@@ -30,7 +30,18 @@ defmodule ComponentsElixir.Inventory.Component do
|
||||
@doc false
|
||||
def changeset(component, attrs) do
|
||||
component
|
||||
|> cast(attrs, [:name, :description, :keywords, :position, :count, :datasheet_url, :datasheet_filename, :image_filename, :category_id, :storage_location_id])
|
||||
|> cast(attrs, [
|
||||
:name,
|
||||
:description,
|
||||
:keywords,
|
||||
:position,
|
||||
:count,
|
||||
:datasheet_url,
|
||||
:datasheet_filename,
|
||||
:image_filename,
|
||||
:category_id,
|
||||
:storage_location_id
|
||||
])
|
||||
|> validate_required([:name, :category_id])
|
||||
|> validate_length(:name, min: 1, max: 255)
|
||||
|> validate_length(:description, max: 2000)
|
||||
|
||||
Reference in New Issue
Block a user