Skip to content
This repository was archived by the owner on Oct 5, 2021. It is now read-only.

Commit a7f21bd

Browse files
committed
Name length check
1 parent 8497832 commit a7f21bd

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

ValheimCharacterEditor/Form1.Designer.cs

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ValheimCharacterEditor/Form1.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,13 @@ private void button_Apply_Click(object sender, EventArgs e)
131131
return;
132132
}
133133

134+
// Check name length
135+
if (!(textBox_Name.Text.Length >= 3 && textBox_Name.Text.Length <= 15))
136+
{
137+
MessageBox.Show("Name must be between 3 and 15 characters.", "ERROR", MessageBoxButtons.OK);
138+
return;
139+
}
140+
134141
try
135142
{
136143
// Ask to continue and write customization

ValheimCharacterEditor_v1.4.PNG

80.9 KB
Loading

0 commit comments

Comments
 (0)