Skip to content

Commit

Permalink
Ajustes gerais
Browse files Browse the repository at this point in the history
* Ajuste na validação IsOptional
- Se for True, ele não continua a validação daquele validate específico
  • Loading branch information
dliocode committed Oct 1, 2021
1 parent 45b2844 commit 9c0abc8
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/core/DataValidator.ItemBase.pas
Original file line number Diff line number Diff line change
Expand Up @@ -154,17 +154,11 @@ function TDataValidatorItemBase.GetValueAsString: string;
LJSONPair := FValue.AsType<TJSONPair>;

if Assigned(LJSONPair) then
begin
if LJSONPair.JsonValue is TJSONNull then
begin
Result := LValue;
end
else
if not (LJSONPair.JsonValue is TJSONNull) then
begin
LValue := LJSONPair.JsonValue.ToString.Trim(['"']);
Result := StringReplace(LValue, '\/', '/', [rfReplaceAll]);
end;
end;
end
else
Result := FValue.AsString;
Expand Down

0 comments on commit 9c0abc8

Please sign in to comment.