Skip to content

Commit

Permalink
Merge pull request #66 from mgeorgebrown89/plainttextinput-fix
Browse files Browse the repository at this point in the history
Plainttextinput fix
  • Loading branch information
mgeorgebrown89 authored Nov 1, 2019
2 parents 965b457 + 63cefee commit 279de6d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Slack/Slack.BlockKit/Classes/Elements/PlainTextInput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class PlainTextInput : Element
public string initial_value;
public bool multiline;
private uint _min_length;
private uint _max_length;
private uint _max_length = 100;
private const int inputLengthMax = 3000;

public PlainTextInput(string action_id) : base("plain_text_input")
Expand Down
14 changes: 14 additions & 0 deletions Slack/Slack.BlockKit/Classes/Layout/Input.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ public class Input : Block
private const int labelTextLength = 2000;
private object _element;
private PlainText _hint;
private string _block_id;
private const int block_idLength = 255;
private const int hintTextLength = 2000;
public bool optional;

Expand Down Expand Up @@ -44,6 +46,18 @@ public object element
}
}
}

public string block_id
{
get => _block_id; set
{
if (value.Length > block_idLength)
{
throw new System.Exception($"block_id length must be less than {block_idLength} characters.");
}
_block_id = value;
}
}
public PlainText hint
{
get => _hint; set
Expand Down

0 comments on commit 279de6d

Please sign in to comment.