Skip to content

Commit

Permalink
Fixed default value condition (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
shibayan authored Feb 17, 2021
1 parent 030bb9a commit 0d2606d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sharprompt/Forms/Input.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ protected override bool TryGetResult(out T result)
{
if (string.IsNullOrEmpty(input))
{
if (_targetType.IsValueType && _underlyingType == null && _defaultValue.HasValue)
if (_targetType.IsValueType && _underlyingType == null && !_defaultValue.HasValue)
{
Renderer.SetValidationResult(new ValidationResult("Value is required"));

Expand Down

0 comments on commit 0d2606d

Please sign in to comment.