diff --git a/src/validators/Validator.IsOptional.pas b/src/validators/Validator.IsOptional.pas index 886c4fe..981eaf3 100644 --- a/src/validators/Validator.IsOptional.pas +++ b/src/validators/Validator.IsOptional.pas @@ -65,7 +65,7 @@ function TValidatorIsOptional.Check: IDataValidatorResult; LIsOptional: Boolean; begin LValue := GetValueAsString; - R := True; + R := False; LIsOptional := True; if Assigned(FOptionalExecute) then diff --git a/src/validators/Validator.JSON.Key.IsOptional.pas b/src/validators/Validator.JSON.Key.IsOptional.pas index e6d52ee..67b8a2a 100644 --- a/src/validators/Validator.JSON.Key.IsOptional.pas +++ b/src/validators/Validator.JSON.Key.IsOptional.pas @@ -66,7 +66,7 @@ function TDataValidatorJSONKeyIsOptional.Check: IDataValidatorResult; LJSONPair: TJSONPair; begin LValue := GetValueAsString; - R := True; + R := False; LIsOptional := True; if Assigned(FFuncExecute) then diff --git a/src/validators/Validator.JSON.Key.IsRequired.pas b/src/validators/Validator.JSON.Key.IsRequired.pas index 33b8501..d01f31b 100644 --- a/src/validators/Validator.JSON.Key.IsRequired.pas +++ b/src/validators/Validator.JSON.Key.IsRequired.pas @@ -66,7 +66,7 @@ function TDataValidatorJSONKeyIsRequired.Check: IDataValidatorResult; LJSONPair: TJSONPair; begin LValue := GetValueAsString; - R := True; + R := False; LIsRequired := True; if Assigned(FFuncExecute) then