diff --git a/X2UtSettings.pas b/X2UtSettings.pas index e1df1bb..b2f5da6 100644 --- a/X2UtSettings.pas +++ b/X2UtSettings.pas @@ -140,6 +140,11 @@ type //:$ Deletes the specified value. procedure DeleteValue(const AName: String); virtual; abstract; + + + //:$ Validates the specified value using the defined callback method + //:$ if present. + function ValidateValue(const AName: String; const AValue: Variant): Variant; end; { @@ -425,6 +430,18 @@ begin end; +function TX2Settings.ValidateValue; +var + pDefine: TX2SettingsDefine; + +begin + Result := AValue; + pDefine := FFactory.GetDefine(FSection, AName); + if Assigned(pDefine) then + pDefine.Action(saRead, FSection, AName, Result); +end; + + {===================== TX2SettingsFactory Defines ========================================}