Skip to content

Commit

Permalink
fix update validation to support 52
Browse files Browse the repository at this point in the history
  • Loading branch information
ambuznego committed Nov 1, 2022
1 parent 10dbb5d commit 20f6880
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/console/devices/device.ex
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ defmodule Console.Devices.Device do
|> cast(attrs, [:name, :dev_eui, :app_eui, :app_key, :active, :packet_config_id, :config_profile_id, :in_xor_filter])
|> check_attrs_format()
|> validate_required([:name, :dev_eui, :app_eui, :app_key, :oui, :organization_id])
|> validate_length(:name, max: 50)
|> validate_length(:name, max: 52)
|> unique_constraint(:dev_eui, name: :devices_dev_eui_app_eui_app_key_index, message: "An unexpected error has occurred, please try again")
|> unique_constraint(:hotspot_address, name: :devices_hotspot_address_index, message: "This hotspot address is already used")
end
Expand Down

0 comments on commit 20f6880

Please sign in to comment.