Dear Sir or Madam,
I need your assistance with a TMS WebCore project!
I am getting a compiler error. [Fehler] P_RegistrierungBearb.pas(6): can't find unit "System.RegularExpressions"
In the ..pas file,
unit P_RegistrierungBearb;
interface
uses
System.RegularExpressions, //wegen der Passwort-Kontrolle
System.SysUtils, System.Classes,
Vcl.StdCtrls, Vcl.Controls,
....
and the function is:
function TfP_RegistrierungBearb.ValidatePassword(aPassword: String; var ErrorMessage: String): Boolean;
begin
Result := false;
ErrorMessage := '';
if Length(aPassword) <> 9 then
begin
ErrorMessage := 'Password must be exactly 9 characters long';
exit;
end;
if not TRegEx.IsMatch(aPassword, '[a-z]') then
begin
ErrorMessage := 'At least 1 character in the password must be lowercase';
exit;
end;
if not TRegEx.IsMatch(aPassword, '[A-Z]') then
begin
ErrorMessage := 'At least 1 character in the password must be uppercase';
exit;
end;
if not TRegEx.IsMatch(aPassword, '\d') then
begin
ErrorMessage := 'At least 1 character in the password must be a digit';
exit;
end;
if not TRegEx.IsMatch(aPassword, '[!,#,%,&,,@]') then
begin
ErrorMessage := 'At least 1 character in the password must be one of the following letters: !,#,%,&,,@';
exit;
end;
Result := True;
end;
Is there a way to include System.RegularExpressions into the WebCore project?