Skip to content

Commit c1c06d8

Browse files
committed
Ajustes no Validator.IsOptional
1 parent 10042d3 commit c1c06d8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/validators/Validator.IsOptional.pas

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,16 @@ function TValidatorIsOptional.Check: IDataValidatorResult;
6262
var
6363
LValue: string;
6464
R: Boolean;
65+
LIsOptional: Boolean;
6566
begin
6667
LValue := GetValueAsString;
68+
R := True;
69+
LIsOptional := True;
6770

6871
if Assigned(FOptionalExecute) then
69-
R := FOptionalExecute(LValue)
70-
else
72+
LIsOptional := FOptionalExecute(LValue);
73+
74+
if LIsOptional then
7175
R := LValue.IsEmpty;
7276

7377
if FIsNot then

0 commit comments

Comments
 (0)