Skip to content

Commit 2c8202b

Browse files
committed
fix: Clarify conditional by explicitly checking for HasValue.
1 parent f2316cc commit 2c8202b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

com.playeveryware.eos/Runtime/Core/Config/Attributes/Validators/LengthValidationAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public override bool ValidateStringField(string value, out string errorMessage)
6868
return false;
6969
}
7070

71-
if (value.Length > _maxLength)
71+
if (_maxLength.HasValue && value.Length > _maxLength)
7272
{
7373
errorMessage = $"String must be no more than {_maxLength.Value} characters long.";
7474
return false;

0 commit comments

Comments
 (0)