diff --git a/README.md b/README.md
index 44a040b..dcbe02b 100644
--- a/README.md
+++ b/README.md
@@ -54,7 +54,7 @@ uses DataValidator;
* Values
* JSON
-##### Modo: Values
+## Values
- No modo values, o valor informado no **_validate_** é o que será analisado!
@@ -80,10 +80,10 @@ begin
.NormalizeEmail
.&End
- .CheckAll;
+ .Check;
```
-##### Modo: JSON
+## JSON
- No modo JSON, o que deve ser informado **_validate_** é o nome da key do json!
- Caso seja utilizado algum **_sanitizer_**, o valor dentro do JSON será modificado!
@@ -145,35 +145,42 @@ begin
.CheckAll;
```
+## Informações
+
+### Diferença de Check e CheckAll
+- **Check**: Faz a verificação de todos os **_validate_**, mas se houver um item com retorno **_false_** ele interrompe, retornando uma única mensagem com erro se tiver!
+
+- **CheckAll**: Faz a verificação de todos os **_validate_**, retornando todas mensagens com erro se tiver!
+Usando o ``` CheckAll(TDataValidatorCheckAll.tcFirst) ``` ele retornar apenas a primeira mensagem de erro de cada **_validate_**.
-#### Como saber se houve error
+### Como saber se houve error
```
Result := LResult.Ok; // True = Nenhum erro | False = Tem erro
```
-#### Como recuperar todas as mensagens de errors
+### Como recuperar a mensagem com erro
```
Result := LResult.Informations.Message;
```
-#### Como recuperar uma única mensagem de error
+### Como recuperar uma única mensagem de error
```
Result := LResult.Informations.GetItem(0).Message;
```
-#### Como recuperar o total de errors
+### Como recuperar a quantidade de errors
```
Result := LResult.Informations.Count;
```
-#### Diferença de Check e CheckAll
-
-- **Check**: Faz a verificação de todos os **_validate_**, mas se houver um item com retorno **_false_** ele interrompe, retornando uma única mensagem de erro se tiver!
-- **CheckAll**: Faz a verificação de todos os **_validate_**, retornando todas mensagens de erro se tiver!
+### Como recuperar o valor analizado
+```
+ Result := LResult.Values[0]; // Recupera o primeiro valor
+```
-#### **Validação Schema**
+### **Validação Schema**
- É uma forma de criar um esqueleto de validação e conseguir reutilizar em outras validações.
```
@@ -250,84 +257,84 @@ TDataValidator.Values
## Validators / Sanitizers
-|Validação para values |Validação JSON (Key/Value) |Sanitizers para Valus |
-| ------------ | ------------ | ------------ |
-|CustomValue |(Key) IsOptional |CustomSanitizer |
-|Contains |(Key) IsRequired |NormalizeEmail |
-|EndsWith |(Value) CustomJSONValue |OnlyNumbers |
-|IsAlpha |(Value) IsNull |RemoveAccents |
-|IsAlphaNumeric |(Value) MinItems |Replace |
-|IsAscii |(Value) MaxItems |ToBase64Decode |
-|IsBase32 |(Value) + Validação para values |ToBase64Encode |
-|IsBase58 | |ToDate |
-|IsBase64 | |ToDateTime |
-|IsBetween | |ToHTMLDecode |
-|IsBoolean | |ToHTMLEncode |
-|IsBTCAddress | |ToInteger |
-|IsCNPJ | |ToLowerCase |
-|IsCPF | |ToMD5 |
-|IsCPFCNPJ | |ToNumeric |
-|IsDate | |ToTime |
-|IsDateBetween | |ToUpperCase |
-|IsDateEquals | |ToURLDecode |
-|IsDateGreaterThan | |ToURLEncode |
-|IsDateLessThan | |Trim |
-|IsDateTime | |TrimLeft |
-|IsEmail | |TrimRight |
-|IsEmpty | | |
-|IsEquals | | |
-|IsEthereumAddress | | |
-|IsGreaterThan | | |
-|IsGTIN | | |
-|IsGTIN8 | | |
-|IsGTIN12 | | |
-|IsGTIN13 | | |
-|IsGTIN14 | | |
-|IsHexadecimal | | |
-|IsHexColor | | |
-|IsInteger | | |
-|IsIP | | |
-|IsIPv4 | | |
-|IsIPv6 | | |
-|IsISO8601 | | |
-|IsJSON | | |
-|IsJSONArray | | |
-|IsJSONObject | | |
-|IsJWT | | |
-|IsLatLong | | |
-|IsLength | | |
-|IsLessThan | | |
-|IsLocale | | |
-|IsLowercase | | |
-|IsMACAddress | | |
-|IsMagnetURI | | |
-|IsMD5 | | |
-|IsMimeType | | |
-|IsMongoId | | |
-|IsNegative | | |
-|IsNumeric | | |
-|IsOptional | | |
-|IsOctal | | |
-|IsPassportNumber | | |
-|IsPhoneNumber | | |
-|IsPort | | |
-|IsPositive | | |
-|IsPostalCode | | |
-|IsRGBColor | | |
-|IsSSN | | |
-|IsTime | | |
-|IsTimeBetween | | |
-|IsTimeEquals | | |
-|IsTimeGreaterThan | | |
-|IsTimeLessThan | | |
-|IsUppercase | | |
-|IsURL | | |
-|IsUUID | | |
-|IsUUIDv1 | | |
-|IsUUIDv2 | | |
-|IsUUIDv3 | | |
-|IsUUIDv4 | | |
-|IsUUIDv5 | | |
-|IsZero | | |
-|RegexIsMatch | | |
-|StartsWith | | |
+| Validação para values | Validação JSON (Key/Value) | Sanitizers para values |
+| ------------ | ------------ | ------------ |
+| CustomValue | (Key) IsOptional | CustomSanitizer |
+| Contains | (Key) IsRequired | NormalizeEmail |
+| EndsWith | (Value) CustomJSONValue | OnlyNumbers |
+| IsAlpha | (Value) IsJSONNull | RemoveAccents |
+| IsAlphaNumeric | (Value) IsJSONBoolean | Replace |
+| IsAscii | (Value) IsJSONNumeric | ToBase64Decode |
+| IsBase32 | (Value) IsJSONString | ToBase64Encode |
+| IsBase58 | (Value) MinItems | ToDate |
+| IsBase64 | (Value) MaxItems | ToDateTime |
+| IsBetween | (Value) + Validação para values | ToHTMLDecode |
+| IsBoolean | | ToHTMLEncode |
+| IsBTCAddress | | ToInteger |
+| IsCNPJ | | ToLowerCase |
+| IsCPF | | ToMD5 |
+| IsCPFCNPJ | | ToNumeric |
+| IsDate | | ToTime |
+| IsDateBetween | | ToUpperCase |
+| IsDateEquals | | ToURLDecode |
+| IsDateGreaterThan | | ToURLEncode |
+| IsDateLessThan | | Trim |
+| IsDateTime | | TrimLeft |
+| IsEmail | | TrimRight |
+| IsEmpty | | |
+| IsEquals | | |
+| IsEthereumAddress | | |
+| IsGreaterThan | | |
+| IsGTIN | | |
+| IsGTIN8 | | |
+| IsGTIN12 | | |
+| IsGTIN13 | | |
+| IsGTIN14 | | |
+| IsHexadecimal | | |
+| IsHexColor | | |
+| IsInteger | | |
+| IsIP | | |
+| IsIPv4 | | |
+| IsIPv6 | | |
+| IsISO8601 | | |
+| IsJSON | | |
+| IsJSONArray | | |
+| IsJSONObject | | |
+| IsJWT | | |
+| IsLatLong | | |
+| IsLength | | |
+| IsLessThan | | |
+| IsLocale | | |
+| IsLowercase | | |
+| IsMACAddress | | |
+| IsMagnetURI | | |
+| IsMD5 | | |
+| IsMimeType | | |
+| IsMongoId | | |
+| IsNegative | | |
+| IsNumeric | | |
+| IsOptional | | |
+| IsOctal | | |
+| IsPassportNumber | | |
+| IsPhoneNumber | | |
+| IsPort | | |
+| IsPositive | | |
+| IsPostalCode | | |
+| IsRGBColor | | |
+| IsSSN | | |
+| IsTime | | |
+| IsTimeBetween | | |
+| IsTimeEquals | | |
+| IsTimeGreaterThan | | |
+| IsTimeLessThan | | |
+| IsUppercase | | |
+| IsURL | | |
+| IsUUID | | |
+| IsUUIDv1 | | |
+| IsUUIDv2 | | |
+| IsUUIDv3 | | |
+| IsUUIDv4 | | |
+| IsUUIDv5 | | |
+| IsZero | | |
+| RegexIsMatch | | |
+| StartsWith | | |
diff --git a/samples/JSON/Basic/Basic.delphilsp.json b/samples/JSON/Basic/Basic.delphilsp.json
new file mode 100644
index 0000000..0d083fa
--- /dev/null
+++ b/samples/JSON/Basic/Basic.delphilsp.json
@@ -0,0 +1 @@
+{ "settings": { "project": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/samples/JSON/Basic/Basic.dpr", "dllname": "dcc32280.dll", "dccOptions": "-$O- -$W+ -$R+ -$Q+ --no-config -Q -TX.exe -AGenerics.Collections=System.Generics.Collections;Generics.Defaults=System.Generics.Defaults;WinTypes=Winapi.Windows;WinProcs=Winapi.Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -DDEBUG;;FRAMEWORK_VCL -E.\\Win32\\Debug -I\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\debug\";..\\..\\..\\src\\core;..\\..\\..\\src\\sanitializators;..\\..\\..\\src\\validators;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\release\";C:\\Users\\danil\\Documents\\Embarcadero\\Studio\\22.0\\Imports;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\Imports\";C:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\include\" -LEC:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Bpl -LNC:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp -NU.\\Win32\\Debug -NSWinapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell; -O..\\..\\..\\src\\core;..\\..\\..\\src\\sanitializators;..\\..\\..\\src\\validators;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\release\";C:\\Users\\danil\\Documents\\Embarcadero\\Studio\\22.0\\Imports;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\Imports\";C:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\include\" -R..\\..\\..\\src\\core;..\\..\\..\\src\\sanitializators;..\\..\\..\\src\\validators;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\release\";C:\\Users\\danil\\Documents\\Embarcadero\\Studio\\22.0\\Imports;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\Imports\";C:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\include\" -U\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\debug\";..\\..\\..\\src\\core;..\\..\\..\\src\\sanitializators;..\\..\\..\\src\\validators;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\release\";C:\\Users\\danil\\Documents\\Embarcadero\\Studio\\22.0\\Imports;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\Imports\";C:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\include\" -V -VN -NBC:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp -NHC:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\hpp\\Win32 -NO.\\Win32\\Debug -LU" , "projectFiles":[ { "name": "UBasic", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/samples/JSON/Basic/UBasic.pas" }, { "name": "DataValidator.Context", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Context.pas" }, { "name": "DataValidator.Information", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Information.pas" }, { "name": "DataValidator.Intf", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Intf.pas" }, { "name": "DataValidator.ItemBase", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.ItemBase.pas" }, { "name": "DataValidator.ItemBase.Sanitizer", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.ItemBase.Sanitizer.pas" }, { "name": "DataValidator.JSON.Base", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.JSON.Base.pas" }, { "name": "DataValidator.JSON.Context", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.JSON.Context.pas" }, { "name": "DataValidator.JSON", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.JSON.pas" }, { "name": "DataValidator", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.pas" }, { "name": "DataValidator.Result", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Result.pas" }, { "name": "DataValidator.Schema.Base", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Schema.Base.pas" }, { "name": "DataValidator.Schema", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Schema.pas" }, { "name": "DataValidator.Types", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Types.pas" }, { "name": "DataValidator.Value.Base", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Value.Base.pas" }, { "name": "DataValidator.Value", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Value.pas" }, { "name": "Sanitizer.Base64.Decode", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.Base64.Decode.pas" }, { "name": "Sanitizer.Base64.Encode", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.Base64.Encode.pas" }, { "name": "Sanitizer.Custom", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.Custom.pas" }, { "name": "Sanitizer.HTML.Decode", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.HTML.Decode.pas" }, { "name": "Sanitizer.HTML.Encode", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.HTML.Encode.pas" }, { "name": "Sanitizer.NormalizeEmail", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.NormalizeEmail.pas" }, { "name": "Sanitizer.OnlyNumbers", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.OnlyNumbers.pas" }, { "name": "Sanitizer.RemoveAccents", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.RemoveAccents.pas" }, { "name": "Sanitizer.Replace", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.Replace.pas" }, { "name": "Sanitizer.ToDate", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.ToDate.pas" }, { "name": "Sanitizer.ToDateTime", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.ToDateTime.pas" }, { "name": "Sanitizer.ToInteger", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.ToInteger.pas" }, { "name": "Sanitizer.ToLowerCase", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.ToLowerCase.pas" }, { "name": "Sanitizer.ToMD5", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.ToMD5.pas" }, { "name": "Sanitizer.ToNumeric", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.ToNumeric.pas" }, { "name": "Sanitizer.ToTime", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.ToTime.pas" }, { "name": "Sanitizer.ToUpperCase", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.ToUpperCase.pas" }, { "name": "Sanitizer.Trim", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.Trim.pas" }, { "name": "Sanitizer.TrimLeft", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.TrimLeft.pas" }, { "name": "Sanitizer.TrimRight", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.TrimRight.pas" }, { "name": "Sanitizer.URL.Decode", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.URL.Decode.pas" }, { "name": "Sanitizer.URL.Encode", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.URL.Encode.pas" }, { "name": "Validator.Contains", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.Contains.pas" }, { "name": "Validator.Custom", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.Custom.pas" }, { "name": "Validator.EndsWith", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.EndsWith.pas" }, { "name": "Validator.IsAlpha", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsAlpha.pas" }, { "name": "Validator.IsAlphanumeric", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsAlphanumeric.pas" }, { "name": "Validator.IsAscii", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsAscii.pas" }, { "name": "Validator.IsBase32", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsBase32.pas" }, { "name": "Validator.IsBase58", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsBase58.pas" }, { "name": "Validator.IsBase64", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsBase64.pas" }, { "name": "Validator.IsBetween", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsBetween.pas" }, { "name": "Validator.IsBoolean", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsBoolean.pas" }, { "name": "Validator.IsBTCAddress", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsBTCAddress.pas" }, { "name": "Validator.IsCNPJ", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsCNPJ.pas" }, { "name": "Validator.IsCPF", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsCPF.pas" }, { "name": "Validator.IsCPFCNPJ", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsCPFCNPJ.pas" }, { "name": "Validator.IsDate", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsDate.pas" }, { "name": "Validator.IsDateBetween", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsDateBetween.pas" }, { "name": "Validator.IsDateEquals", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsDateEquals.pas" }, { "name": "Validator.IsDateGreaterThan", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsDateGreaterThan.pas" }, { "name": "Validator.IsDateLessThan", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsDateLessThan.pas" }, { "name": "Validator.IsDateTime", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsDateTime.pas" }, { "name": "Validator.IsEmail", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsEmail.pas" }, { "name": "Validator.IsEmpty", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsEmpty.pas" }, { "name": "Validator.IsEquals", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsEquals.pas" }, { "name": "Validator.IsEthereumAddress", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsEthereumAddress.pas" }, { "name": "Validator.IsGreaterThan", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsGreaterThan.pas" }, { "name": "Validator.IsGTIN", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsGTIN.pas" }, { "name": "Validator.IsHexadecimal", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsHexadecimal.pas" }, { "name": "Validator.IsHexColor", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsHexColor.pas" }, { "name": "Validator.IsInteger", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsInteger.pas" }, { "name": "Validator.IsIP", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsIP.pas" }, { "name": "Validator.IsISO8601", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsISO8601.pas" }, { "name": "Validator.IsJSON", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsJSON.pas" }, { "name": "Validator.IsJWT", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsJWT.pas" }, { "name": "Validator.IsLatLong", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsLatLong.pas" }, { "name": "Validator.IsLength", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsLength.pas" }, { "name": "Validator.IsLessThan", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsLessThan.pas" }, { "name": "Validator.IsLocale", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsLocale.pas" }, { "name": "Validator.IsLowercase", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsLowercase.pas" }, { "name": "Validator.IsMACAddress", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsMACAddress.pas" }, { "name": "Validator.IsMagnetURI", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsMagnetURI.pas" }, { "name": "Validator.IsMD5", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsMD5.pas" }, { "name": "Validator.IsMimeType", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsMimeType.pas" }, { "name": "Validator.IsMongoId", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsMongoId.pas" }, { "name": "Validator.IsNegative", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsNegative.pas" }, { "name": "Validator.IsNumeric", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsNumeric.pas" }, { "name": "Validator.IsOctal", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsOctal.pas" }, { "name": "Validator.IsOptional", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsOptional.pas" }, { "name": "Validator.IsPassportNumber", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsPassportNumber.pas" }, { "name": "Validator.IsPhoneNumber", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsPhoneNumber.pas" }, { "name": "Validator.IsPort", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsPort.pas" }, { "name": "Validator.IsPositive", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsPositive.pas" }, { "name": "Validator.IsPostalCode", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsPostalCode.pas" }, { "name": "Validator.IsRGBColor", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsRGBColor.pas" }, { "name": "Validator.IsSSN", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsSSN.pas" }, { "name": "Validator.IsTime", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsTime.pas" }, { "name": "Validator.IsTimeBetween", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsTimeBetween.pas" }, { "name": "Validator.IsTimeEquals", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsTimeEquals.pas" }, { "name": "Validator.IsTimeGreaterThan", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsTimeGreaterThan.pas" }, { "name": "Validator.IsTimeLessThan", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsTimeLessThan.pas" }, { "name": "Validator.IsUppercase", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsUppercase.pas" }, { "name": "Validator.IsURL", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsURL.pas" }, { "name": "Validator.IsUUID", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsUUID.pas" }, { "name": "Validator.IsZero", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsZero.pas" }, { "name": "Validator.JSON.Key.IsOptional", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.JSON.Key.IsOptional.pas" }, { "name": "Validator.JSON.Key.IsRequired", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.JSON.Key.IsRequired.pas" }, { "name": "Validator.JSON.Value.Custom", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.JSON.Value.Custom.pas" }, { "name": "Validator.JSON.Value.IsJSONValue", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.JSON.Value.IsJSONValue.pas" }, { "name": "Validator.JSON.Value.IsMinMaxItems", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.JSON.Value.IsMinMaxItems.pas" }, { "name": "Validator.Regex.IsMatch", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.Regex.IsMatch.pas" }, { "name": "Validator.StartsWith", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.StartsWith.pas" }, { "name": "Validator.JSON.SubValidator.Custom", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.JSON.SubValidator.Custom.pas" } ] , "includeDCUsInUsesCompletion": true, "browsingPaths": [ "file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/OCX/Servers","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/SOURCE/VCL","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/rtl/common","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/SOURCE/RTL/SYS","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/rtl/win","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/rtl/win/winrt","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/ToolsAPI","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/SOURCE/IBX","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Internet","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/SOURCE/PROPERTY%20EDITORS","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/soap","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/SOURCE/XML","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Indy10/Core","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Indy10/System","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Indy10/Protocols","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/fmx","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/databinding/components","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/databinding/engine","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/databinding/graph","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/ado","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/cloud","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/datasnap","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/dbx","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/dsnap","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/vclctrls","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/datasnap/connectors","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/datasnap/proxygen","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DataExplorer","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/DUnitWizard/Source/Common","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/DUnitWizard/Source/Common/dunit","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/DUnitWizard/Source/DelphiExperts/Common","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/DUnitWizard/Source/DelphiExperts/DUnitProject","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/DUnitWizard/Source/DelphiExperts/DUnitProject/dunit","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/src","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/tests","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Experts","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/indy/abstraction","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/indy/implementation","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/indyimpl","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Property%20Editors/Indy10","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/soap/wsdlimporter","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Visualizers","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/XMLReporting","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/XPGen","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/rest","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/firedac","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/tethering","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnitX","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/ems","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/rtl/net","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/FlatBox2D" ] } }
\ No newline at end of file
diff --git a/samples/JSON/Basic/Basic.dpr b/samples/JSON/Basic/Basic.dpr
new file mode 100644
index 0000000..e898a27
--- /dev/null
+++ b/samples/JSON/Basic/Basic.dpr
@@ -0,0 +1,123 @@
+program Basic;
+
+uses
+ Vcl.Forms,
+ UBasic in 'UBasic.pas' {Form2},
+ DataValidator.Context in '..\..\..\src\core\DataValidator.Context.pas',
+ DataValidator.Information in '..\..\..\src\core\DataValidator.Information.pas',
+ DataValidator.Intf in '..\..\..\src\core\DataValidator.Intf.pas',
+ DataValidator.ItemBase in '..\..\..\src\core\DataValidator.ItemBase.pas',
+ DataValidator.ItemBase.Sanitizer in '..\..\..\src\core\DataValidator.ItemBase.Sanitizer.pas',
+ DataValidator.JSON.Base in '..\..\..\src\core\DataValidator.JSON.Base.pas',
+ DataValidator.JSON.Context in '..\..\..\src\core\DataValidator.JSON.Context.pas',
+ DataValidator.JSON in '..\..\..\src\core\DataValidator.JSON.pas',
+ DataValidator in '..\..\..\src\core\DataValidator.pas',
+ DataValidator.Result in '..\..\..\src\core\DataValidator.Result.pas',
+ DataValidator.Schema.Base in '..\..\..\src\core\DataValidator.Schema.Base.pas',
+ DataValidator.Schema in '..\..\..\src\core\DataValidator.Schema.pas',
+ DataValidator.Types in '..\..\..\src\core\DataValidator.Types.pas',
+ DataValidator.Value.Base in '..\..\..\src\core\DataValidator.Value.Base.pas',
+ DataValidator.Value in '..\..\..\src\core\DataValidator.Value.pas',
+ Sanitizer.Base64.Decode in '..\..\..\src\sanitializators\Sanitizer.Base64.Decode.pas',
+ Sanitizer.Base64.Encode in '..\..\..\src\sanitializators\Sanitizer.Base64.Encode.pas',
+ Sanitizer.Custom in '..\..\..\src\sanitializators\Sanitizer.Custom.pas',
+ Sanitizer.HTML.Decode in '..\..\..\src\sanitializators\Sanitizer.HTML.Decode.pas',
+ Sanitizer.HTML.Encode in '..\..\..\src\sanitializators\Sanitizer.HTML.Encode.pas',
+ Sanitizer.NormalizeEmail in '..\..\..\src\sanitializators\Sanitizer.NormalizeEmail.pas',
+ Sanitizer.OnlyNumbers in '..\..\..\src\sanitializators\Sanitizer.OnlyNumbers.pas',
+ Sanitizer.RemoveAccents in '..\..\..\src\sanitializators\Sanitizer.RemoveAccents.pas',
+ Sanitizer.Replace in '..\..\..\src\sanitializators\Sanitizer.Replace.pas',
+ Sanitizer.ToDate in '..\..\..\src\sanitializators\Sanitizer.ToDate.pas',
+ Sanitizer.ToDateTime in '..\..\..\src\sanitializators\Sanitizer.ToDateTime.pas',
+ Sanitizer.ToInteger in '..\..\..\src\sanitializators\Sanitizer.ToInteger.pas',
+ Sanitizer.ToLowerCase in '..\..\..\src\sanitializators\Sanitizer.ToLowerCase.pas',
+ Sanitizer.ToMD5 in '..\..\..\src\sanitializators\Sanitizer.ToMD5.pas',
+ Sanitizer.ToNumeric in '..\..\..\src\sanitializators\Sanitizer.ToNumeric.pas',
+ Sanitizer.ToTime in '..\..\..\src\sanitializators\Sanitizer.ToTime.pas',
+ Sanitizer.ToUpperCase in '..\..\..\src\sanitializators\Sanitizer.ToUpperCase.pas',
+ Sanitizer.Trim in '..\..\..\src\sanitializators\Sanitizer.Trim.pas',
+ Sanitizer.TrimLeft in '..\..\..\src\sanitializators\Sanitizer.TrimLeft.pas',
+ Sanitizer.TrimRight in '..\..\..\src\sanitializators\Sanitizer.TrimRight.pas',
+ Sanitizer.URL.Decode in '..\..\..\src\sanitializators\Sanitizer.URL.Decode.pas',
+ Sanitizer.URL.Encode in '..\..\..\src\sanitializators\Sanitizer.URL.Encode.pas',
+ Validator.Contains in '..\..\..\src\validators\Validator.Contains.pas',
+ Validator.Custom in '..\..\..\src\validators\Validator.Custom.pas',
+ Validator.EndsWith in '..\..\..\src\validators\Validator.EndsWith.pas',
+ Validator.IsAlpha in '..\..\..\src\validators\Validator.IsAlpha.pas',
+ Validator.IsAlphanumeric in '..\..\..\src\validators\Validator.IsAlphanumeric.pas',
+ Validator.IsAscii in '..\..\..\src\validators\Validator.IsAscii.pas',
+ Validator.IsBase32 in '..\..\..\src\validators\Validator.IsBase32.pas',
+ Validator.IsBase58 in '..\..\..\src\validators\Validator.IsBase58.pas',
+ Validator.IsBase64 in '..\..\..\src\validators\Validator.IsBase64.pas',
+ Validator.IsBetween in '..\..\..\src\validators\Validator.IsBetween.pas',
+ Validator.IsBoolean in '..\..\..\src\validators\Validator.IsBoolean.pas',
+ Validator.IsBTCAddress in '..\..\..\src\validators\Validator.IsBTCAddress.pas',
+ Validator.IsCNPJ in '..\..\..\src\validators\Validator.IsCNPJ.pas',
+ Validator.IsCPF in '..\..\..\src\validators\Validator.IsCPF.pas',
+ Validator.IsCPFCNPJ in '..\..\..\src\validators\Validator.IsCPFCNPJ.pas',
+ Validator.IsDate in '..\..\..\src\validators\Validator.IsDate.pas',
+ Validator.IsDateBetween in '..\..\..\src\validators\Validator.IsDateBetween.pas',
+ Validator.IsDateEquals in '..\..\..\src\validators\Validator.IsDateEquals.pas',
+ Validator.IsDateGreaterThan in '..\..\..\src\validators\Validator.IsDateGreaterThan.pas',
+ Validator.IsDateLessThan in '..\..\..\src\validators\Validator.IsDateLessThan.pas',
+ Validator.IsDateTime in '..\..\..\src\validators\Validator.IsDateTime.pas',
+ Validator.IsEmail in '..\..\..\src\validators\Validator.IsEmail.pas',
+ Validator.IsEmpty in '..\..\..\src\validators\Validator.IsEmpty.pas',
+ Validator.IsEquals in '..\..\..\src\validators\Validator.IsEquals.pas',
+ Validator.IsEthereumAddress in '..\..\..\src\validators\Validator.IsEthereumAddress.pas',
+ Validator.IsGreaterThan in '..\..\..\src\validators\Validator.IsGreaterThan.pas',
+ Validator.IsGTIN in '..\..\..\src\validators\Validator.IsGTIN.pas',
+ Validator.IsHexadecimal in '..\..\..\src\validators\Validator.IsHexadecimal.pas',
+ Validator.IsHexColor in '..\..\..\src\validators\Validator.IsHexColor.pas',
+ Validator.IsInteger in '..\..\..\src\validators\Validator.IsInteger.pas',
+ Validator.IsIP in '..\..\..\src\validators\Validator.IsIP.pas',
+ Validator.IsISO8601 in '..\..\..\src\validators\Validator.IsISO8601.pas',
+ Validator.IsJSON in '..\..\..\src\validators\Validator.IsJSON.pas',
+ Validator.IsJWT in '..\..\..\src\validators\Validator.IsJWT.pas',
+ Validator.IsLatLong in '..\..\..\src\validators\Validator.IsLatLong.pas',
+ Validator.IsLength in '..\..\..\src\validators\Validator.IsLength.pas',
+ Validator.IsLessThan in '..\..\..\src\validators\Validator.IsLessThan.pas',
+ Validator.IsLocale in '..\..\..\src\validators\Validator.IsLocale.pas',
+ Validator.IsLowercase in '..\..\..\src\validators\Validator.IsLowercase.pas',
+ Validator.IsMACAddress in '..\..\..\src\validators\Validator.IsMACAddress.pas',
+ Validator.IsMagnetURI in '..\..\..\src\validators\Validator.IsMagnetURI.pas',
+ Validator.IsMD5 in '..\..\..\src\validators\Validator.IsMD5.pas',
+ Validator.IsMimeType in '..\..\..\src\validators\Validator.IsMimeType.pas',
+ Validator.IsMongoId in '..\..\..\src\validators\Validator.IsMongoId.pas',
+ Validator.IsNegative in '..\..\..\src\validators\Validator.IsNegative.pas',
+ Validator.IsNumeric in '..\..\..\src\validators\Validator.IsNumeric.pas',
+ Validator.IsOctal in '..\..\..\src\validators\Validator.IsOctal.pas',
+ Validator.IsOptional in '..\..\..\src\validators\Validator.IsOptional.pas',
+ Validator.IsPassportNumber in '..\..\..\src\validators\Validator.IsPassportNumber.pas',
+ Validator.IsPhoneNumber in '..\..\..\src\validators\Validator.IsPhoneNumber.pas',
+ Validator.IsPort in '..\..\..\src\validators\Validator.IsPort.pas',
+ Validator.IsPositive in '..\..\..\src\validators\Validator.IsPositive.pas',
+ Validator.IsPostalCode in '..\..\..\src\validators\Validator.IsPostalCode.pas',
+ Validator.IsRGBColor in '..\..\..\src\validators\Validator.IsRGBColor.pas',
+ Validator.IsSSN in '..\..\..\src\validators\Validator.IsSSN.pas',
+ Validator.IsTime in '..\..\..\src\validators\Validator.IsTime.pas',
+ Validator.IsTimeBetween in '..\..\..\src\validators\Validator.IsTimeBetween.pas',
+ Validator.IsTimeEquals in '..\..\..\src\validators\Validator.IsTimeEquals.pas',
+ Validator.IsTimeGreaterThan in '..\..\..\src\validators\Validator.IsTimeGreaterThan.pas',
+ Validator.IsTimeLessThan in '..\..\..\src\validators\Validator.IsTimeLessThan.pas',
+ Validator.IsUppercase in '..\..\..\src\validators\Validator.IsUppercase.pas',
+ Validator.IsURL in '..\..\..\src\validators\Validator.IsURL.pas',
+ Validator.IsUUID in '..\..\..\src\validators\Validator.IsUUID.pas',
+ Validator.IsZero in '..\..\..\src\validators\Validator.IsZero.pas',
+ Validator.JSON.Key.IsOptional in '..\..\..\src\validators\Validator.JSON.Key.IsOptional.pas',
+ Validator.JSON.Key.IsRequired in '..\..\..\src\validators\Validator.JSON.Key.IsRequired.pas',
+ Validator.JSON.Value.Custom in '..\..\..\src\validators\Validator.JSON.Value.Custom.pas',
+ Validator.JSON.Value.IsJSONValue in '..\..\..\src\validators\Validator.JSON.Value.IsJSONValue.pas',
+ Validator.JSON.Value.IsMinMaxItems in '..\..\..\src\validators\Validator.JSON.Value.IsMinMaxItems.pas',
+ Validator.Regex.IsMatch in '..\..\..\src\validators\Validator.Regex.IsMatch.pas',
+ Validator.StartsWith in '..\..\..\src\validators\Validator.StartsWith.pas',
+ Validator.JSON.SubValidator.Custom in '..\..\..\src\validators\Validator.JSON.SubValidator.Custom.pas';
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.MainFormOnTaskbar := True;
+ Application.CreateForm(TForm2, Form2);
+ Application.Run;
+end.
diff --git a/samples/Model 4 - JSON/Model4.dproj b/samples/JSON/Basic/Basic.dproj
similarity index 74%
rename from samples/Model 4 - JSON/Model4.dproj
rename to samples/JSON/Basic/Basic.dproj
index c2cbec8..31e5fc4 100644
--- a/samples/Model 4 - JSON/Model4.dproj
+++ b/samples/JSON/Basic/Basic.dproj
@@ -1,14 +1,14 @@
- {94F741A6-BD35-47A9-8BD4-EE1F9DF93D40}
- 19.2
+ {003881DF-B1A2-46DF-906B-76CFCE2C63D1}
+ 19.4
VCL
True
Debug
Win32
1
Application
- Model4.dpr
+ Basic.dpr
true
@@ -57,19 +57,23 @@
$(BDS)\bin\delphi_PROJECTICON.ico
$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png
$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png
- Model4
+ Basic
+ ..\..\..\src\core;..\..\..\src\sanitializators;..\..\..\src\validators;$(DCC_UnitSearchPath)
+ 1046
+ CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=
- DBXSqliteDriver;RESTComponents;fmxase;DBXDb2Driver;DBXInterBaseDriver;vclactnband;vclFireDAC;bindcompvclsmp;emsclientfiredac;tethering;svnui;DataSnapFireDAC;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;svn;DBXOracleDriver;inetdb;FmxTeeUI;emsedge;fmx;FireDACIBDriver;fmxdae;vcledge;vclib;FireDACDBXDriver;dbexpress;IndyCore;vclx;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;vclie;bindengine;DBXMySQLDriver;CloudService;FireDACOracleDriver;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;vcl;IndyIPServer;DBXSybaseASEDriver;IndySystem;FireDACDb2Driver;bindcompvclwinx;dsnapcon;madExcept_;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;madBasic_;TeeDB;FireDAC;emshosting;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;ibxpress;Tee;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;FireDACDSDriver;rtl;emsserverresource;DbxClientDriver;ibxbindings;DBXSybaseASADriver;madDisAsm_;CustomIPTransport;vcldsnap;bindcomp;appanalytics;DBXInformixDriver;IndyIPClient;bindcompvcl;TeeUI;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;inetdbxpress;FireDACMongoDBDriver;DataSnapServerMidas;$(DCC_UsePackage)
+ vclwinx;DataSnapServer;fmx;emshosting;vclie;DbxCommonDriver;bindengine;IndyIPCommon;VCLRESTComponents;DBXMSSQLDriver;FireDACCommonODBC;emsclient;FireDACCommonDriver;appanalytics;IndyProtocols;vclx;IndyIPClient;dbxcds;vcledge;bindcompvclwinx;FmxTeeUI;emsedge;bindcompfmx;DBXFirebirdDriver;inetdb;ibmonitor;FireDACSqliteDriver;DbxClientDriver;FireDACASADriver;Tee;soapmidas;vclactnband;TeeUI;fmxFireDAC;dbexpress;FireDACInfxDriver;DBXMySQLDriver;VclSmp;inet;DataSnapCommon;vcltouch;fmxase;DBXOdbcDriver;dbrtl;FireDACDBXDriver;FireDACOracleDriver;fmxdae;TeeDB;FireDACMSAccDriver;CustomIPTransport;FireDACMSSQLDriver;DataSnapIndy10ServerTransport;DataSnapConnectors;vcldsnap;DBXInterBaseDriver;FireDACMongoDBDriver;IndySystem;FireDACTDataDriver;vcldb;ibxbindings;vclFireDAC;bindcomp;FireDACCommon;DataSnapServerMidas;FireDACODBCDriver;emsserverresource;IndyCore;RESTBackendComponents;bindcompdbx;rtl;FireDACMySQLDriver;FireDACADSDriver;RESTComponents;DBXSqliteDriver;vcl;IndyIPServer;dsnapxml;dsnapcon;DataSnapClient;DataSnapProviderClient;adortl;DBXSybaseASEDriver;DBXDb2Driver;vclimg;DataSnapFireDAC;emsclientfiredac;FireDACPgDriver;FireDAC;FireDACDSDriver;inetdbxpress;xmlrtl;tethering;ibxpress;bindcompvcl;dsnap;CloudService;DBXSybaseASADriver;DBXOracleDriver;FireDACDb2Driver;DBXInformixDriver;vclib;fmxobj;bindcompvclsmp;DataSnapNativeClient;FMXTee;DatasnapConnectorsFreePascal;soaprtl;soapserver;FireDACIBDriver;$(DCC_UsePackage)
Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
Debug
true
CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=
1033
$(BDS)\bin\default_app.manifest
+ true
- DBXSqliteDriver;RESTComponents;fmxase;DBXDb2Driver;DBXInterBaseDriver;vclactnband;vclFireDAC;bindcompvclsmp;emsclientfiredac;tethering;DataSnapFireDAC;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;DBXOracleDriver;inetdb;FmxTeeUI;emsedge;fmx;FireDACIBDriver;fmxdae;vcledge;vclib;FireDACDBXDriver;dbexpress;IndyCore;vclx;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;vclie;bindengine;DBXMySQLDriver;CloudService;FireDACOracleDriver;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;vcl;IndyIPServer;DBXSybaseASEDriver;IndySystem;FireDACDb2Driver;bindcompvclwinx;dsnapcon;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;TeeDB;FireDAC;emshosting;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;ibxpress;Tee;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;FireDACDSDriver;rtl;emsserverresource;DbxClientDriver;ibxbindings;DBXSybaseASADriver;CustomIPTransport;vcldsnap;bindcomp;appanalytics;DBXInformixDriver;IndyIPClient;bindcompvcl;TeeUI;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;inetdbxpress;FireDACMongoDBDriver;DataSnapServerMidas;$(DCC_UsePackage)
+ vclwinx;DataSnapServer;fmx;emshosting;vclie;DbxCommonDriver;bindengine;IndyIPCommon;VCLRESTComponents;DBXMSSQLDriver;FireDACCommonODBC;emsclient;FireDACCommonDriver;appanalytics;IndyProtocols;vclx;IndyIPClient;dbxcds;vcledge;bindcompvclwinx;FmxTeeUI;emsedge;bindcompfmx;DBXFirebirdDriver;inetdb;ibmonitor;FireDACSqliteDriver;DbxClientDriver;FireDACASADriver;Tee;soapmidas;vclactnband;TeeUI;fmxFireDAC;dbexpress;FireDACInfxDriver;DBXMySQLDriver;VclSmp;inet;DataSnapCommon;vcltouch;fmxase;DBXOdbcDriver;dbrtl;FireDACDBXDriver;FireDACOracleDriver;fmxdae;TeeDB;FireDACMSAccDriver;CustomIPTransport;FireDACMSSQLDriver;DataSnapIndy10ServerTransport;DataSnapConnectors;vcldsnap;DBXInterBaseDriver;FireDACMongoDBDriver;IndySystem;FireDACTDataDriver;vcldb;ibxbindings;vclFireDAC;bindcomp;FireDACCommon;DataSnapServerMidas;FireDACODBCDriver;emsserverresource;IndyCore;RESTBackendComponents;bindcompdbx;rtl;FireDACMySQLDriver;FireDACADSDriver;RESTComponents;DBXSqliteDriver;vcl;IndyIPServer;dsnapxml;dsnapcon;DataSnapClient;DataSnapProviderClient;adortl;DBXSybaseASEDriver;DBXDb2Driver;vclimg;DataSnapFireDAC;emsclientfiredac;FireDACPgDriver;FireDAC;FireDACDSDriver;inetdbxpress;xmlrtl;tethering;ibxpress;bindcompvcl;dsnap;CloudService;DBXSybaseASADriver;DBXOracleDriver;FireDACDb2Driver;DBXInformixDriver;vclib;fmxobj;bindcompvclsmp;DataSnapNativeClient;FMXTee;DatasnapConnectorsFreePascal;soaprtl;soapserver;FireDACIBDriver;$(DCC_UsePackage)
DEBUG;$(DCC_Define)
@@ -78,6 +82,8 @@
true
true
true
+ true
+ true
false
@@ -85,7 +91,6 @@
PerMonitorV2
true
1033
- ..\..\src\core;..\..\src\sanitializators;..\..\src\validators;$(DCC_UnitSearchPath)
false
@@ -101,14 +106,119 @@
MainSource
-
-
+
+
dfm
-
- Cfg_2
- Base
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Base
@@ -116,6 +226,10 @@
Cfg_1
Base
+
+ Cfg_2
+ Base
+
Delphi.Personality.12
@@ -123,19 +237,19 @@
- Embarcadero C++Builder Office 2000 Servers Package
- Embarcadero C++Builder Office XP Servers Package
- Microsoft Office 2000 Sample Automation Server Wrapper Components
- Microsoft Office XP Sample Automation Server Wrapper Components
+ Embarcadero C++Builder Office 2000 Servers Package
+ Embarcadero C++Builder Office XP Servers Package
+ Microsoft Office 2000 Sample Automation Server Wrapper Components
+ Microsoft Office XP Sample Automation Server Wrapper Components
-
+
- Model4.exe
+ Basic.exe
true
@@ -151,14 +265,14 @@
0
-
+
classes
- 1
+ 64
classes
- 1
+ 64
@@ -452,6 +566,11 @@
1
.framework
+
+ Contents\MacOS
+ 1
+ .framework
+
0
@@ -479,6 +598,11 @@
1
.dylib
+
+ Contents\MacOS
+ 1
+ .dylib
+
0
.dll;.bpl
@@ -507,6 +631,11 @@
1
.dylib
+
+ Contents\MacOS
+ 1
+ .dylib
+
0
.bpl
@@ -536,6 +665,10 @@
Contents\Resources\StartUp\
0
+
+ Contents\Resources\StartUp\
+ 0
+
0
@@ -801,6 +934,10 @@
..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
1
+
+ ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
+ 1
+
@@ -811,6 +948,10 @@
..\
1
+
+ ..\
+ 1
+
@@ -821,6 +962,10 @@
Contents
1
+
+ Contents
+ 1
+
@@ -831,6 +976,10 @@
Contents\Resources
1
+
+ Contents\Resources
+ 1
+
@@ -861,6 +1010,10 @@
Contents\MacOS
1
+
+ Contents\MacOS
+ 1
+
0
@@ -899,16 +1052,17 @@
1
-
-
+
+
+
+
-
-
-
-
+
+
+
True
diff --git a/samples/JSON/Basic/UBasic.dfm b/samples/JSON/Basic/UBasic.dfm
new file mode 100644
index 0000000..241084a
--- /dev/null
+++ b/samples/JSON/Basic/UBasic.dfm
@@ -0,0 +1,191 @@
+object Form2: TForm2
+ Left = 0
+ Top = 0
+ BorderIcons = [biSystemMenu, biMinimize]
+ Caption = 'DataValidator - Basic'
+ ClientHeight = 598
+ ClientWidth = 935
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -12
+ Font.Name = 'Segoe UI'
+ Font.Style = []
+ OnCreate = FormCreate
+ TextHeight = 15
+ object Panel1: TPanel
+ Left = 0
+ Top = 0
+ Width = 105
+ Height = 598
+ Align = alLeft
+ BevelOuter = bvNone
+ Color = 2565927
+ ParentBackground = False
+ TabOrder = 0
+ ExplicitHeight = 757
+ object btnLimpar: TButton
+ AlignWithMargins = True
+ Left = 3
+ Top = 3
+ Width = 99
+ Height = 25
+ Align = alTop
+ Caption = 'Limpar'
+ TabOrder = 0
+ OnClick = btnLimparClick
+ end
+ object btnCheck: TButton
+ AlignWithMargins = True
+ Left = 3
+ Top = 31
+ Width = 99
+ Height = 25
+ Margins.Top = 0
+ Align = alTop
+ Caption = 'Check'
+ TabOrder = 1
+ OnClick = btnCheckClick
+ end
+ object btnCheckAllFirst: TButton
+ AlignWithMargins = True
+ Left = 3
+ Top = 87
+ Width = 99
+ Height = 25
+ Margins.Top = 0
+ Align = alTop
+ Caption = 'CheckAll (First)'
+ TabOrder = 2
+ OnClick = btnCheckAllFirstClick
+ end
+ object btnCheckAll: TButton
+ AlignWithMargins = True
+ Left = 3
+ Top = 59
+ Width = 99
+ Height = 25
+ Margins.Top = 0
+ Align = alTop
+ Caption = 'CheckAll'
+ TabOrder = 3
+ OnClick = btnCheckAllClick
+ end
+ end
+ object Panel2: TPanel
+ Left = 105
+ Top = 0
+ Width = 830
+ Height = 598
+ Align = alClient
+ BevelOuter = bvNone
+ TabOrder = 1
+ ExplicitWidth = 1244
+ ExplicitHeight = 757
+ object PageControl1: TPageControl
+ Left = 0
+ Top = 0
+ Width = 830
+ Height = 598
+ ActivePage = TabSample2
+ Align = alClient
+ TabOrder = 0
+ object TabSample1: TTabSheet
+ Caption = 'Sample 1'
+ object Memo1: TMemo
+ Left = 0
+ Top = 0
+ Width = 417
+ Height = 568
+ Align = alLeft
+ Lines.Strings = (
+ '{'
+ ' "id": 1,'
+ ' "name": "Cabo USB",'
+ ' "description": "Cabo USB 30 metros",'
+ ' "price": 159.50'
+ '}')
+ ScrollBars = ssBoth
+ TabOrder = 0
+ end
+ object Memo11: TMemo
+ Left = 417
+ Top = 0
+ Width = 405
+ Height = 568
+ Align = alClient
+ Color = clCream
+ ScrollBars = ssBoth
+ TabOrder = 1
+ ExplicitLeft = 600
+ ExplicitWidth = 143
+ ExplicitHeight = 603
+ end
+ end
+ object TabSample2: TTabSheet
+ Caption = 'Sample 2'
+ ImageIndex = 1
+ object Memo2: TMemo
+ Left = 0
+ Top = 0
+ Width = 313
+ Height = 568
+ Align = alLeft
+ Lines.Strings = (
+ '{'
+ ' "id": 1,'
+ ' "customers": {'
+ ' "id": 555,'
+ ' "name": "Fulano da Silva",'
+ ' "gender": "f",'
+ ' "birthDate": "1980-01-20",'
+ ' "documents": ['
+ ' {'
+ ' "type": "cpf",'
+ ' "number": "01234567890"'
+ ' }'
+ ' ],'
+ ' "phones": ['
+ ' {'
+ ' "type": "primary",'
+ ' "number": "554899999999"'
+ ' }'
+ ' ],'
+ ' "email": "developer.dlio@gmail.com"'
+ ' },'
+ ' "items": ['
+ ' {'
+ ' "product_id": 111,'
+ ' "product_name": "Cabo USB 2m",'
+ ' "price": 100,'
+ ' "quantity": 20'
+ ' },'
+ ' {'
+ ' "product_id": 16,'
+ ' "product_name": "PenDriver USB 8GB",'
+ ' "price": 56.90,'
+ ' "quantity": 12.98'
+ ' }'
+ ' ]'
+ '}')
+ ScrollBars = ssBoth
+ TabOrder = 0
+ ExplicitHeight = 603
+ end
+ object Memo22: TMemo
+ Left = 313
+ Top = 0
+ Width = 509
+ Height = 568
+ Align = alClient
+ Color = clCream
+ ScrollBars = ssBoth
+ TabOrder = 1
+ ExplicitLeft = 600
+ ExplicitWidth = 636
+ ExplicitHeight = 727
+ end
+ end
+ end
+ end
+end
diff --git a/samples/JSON/Basic/UBasic.pas b/samples/JSON/Basic/UBasic.pas
new file mode 100644
index 0000000..4e0f27f
--- /dev/null
+++ b/samples/JSON/Basic/UBasic.pas
@@ -0,0 +1,476 @@
+unit UBasic;
+
+interface
+
+uses
+ DataValidator, System.DateUtils,
+ Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
+ Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls, Vcl.Mask, Vcl.ComCtrls;
+
+type
+ TForm2 = class(TForm)
+ Panel1: TPanel;
+ btnLimpar: TButton;
+ btnCheck: TButton;
+ Panel2: TPanel;
+ btnCheckAllFirst: TButton;
+ btnCheckAll: TButton;
+ PageControl1: TPageControl;
+ TabSample1: TTabSheet;
+ TabSample2: TTabSheet;
+ Memo1: TMemo;
+ Memo2: TMemo;
+ Memo22: TMemo;
+ Memo11: TMemo;
+ procedure btnLimparClick(Sender: TObject);
+ procedure btnCheckClick(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ procedure btnCheckAllClick(Sender: TObject);
+ procedure btnCheckAllFirstClick(Sender: TObject);
+ private
+ { Private declarations }
+ FJO: TJSONObject;
+ function ValidationTab1: IDataValidatorJSONResult;
+ function ValidationTab2: IDataValidatorJSONResult;
+ function Validation: IDataValidatorJSONResult;
+ procedure ValidationResult(const AResult: IDataValidatorResult);
+ public
+ { Public declarations }
+ end;
+
+var
+ Form2: TForm2;
+
+implementation
+
+{$R *.dfm}
+
+
+procedure TForm2.btnLimparClick(Sender: TObject);
+var
+ I: Integer;
+begin
+ for I := 0 to Pred(Self.ComponentCount) do
+ if (Self.Components[I] is TMemo) then
+ (Self.Components[I] as TMemo).Clear;
+end;
+
+procedure TForm2.btnCheckClick(Sender: TObject);
+begin
+ ValidationResult(Validation.Check);
+end;
+
+procedure TForm2.btnCheckAllClick(Sender: TObject);
+begin
+ ValidationResult(Validation.CheckAll());
+end;
+
+procedure TForm2.btnCheckAllFirstClick(Sender: TObject);
+begin
+ ValidationResult(Validation.CheckAll(TDataValidatorCheckAll.tcFirst));
+end;
+
+procedure TForm2.ValidationResult(const AResult: IDataValidatorResult);
+begin
+ try
+ if AResult.OK then
+ ShowMessage('Tudo certo!')
+ else
+ begin
+ ShowMessage('Problema na validao: ' + sLineBreak + sLineBreak + AResult.Informations.Message);
+ AResult.Informations.GetItem(0).OnExecute;
+ end;
+ finally
+ if Assigned(FJO) then
+ begin
+ case PageControl1.ActivePageIndex of
+ 0:
+ Memo11.Text := FJO.Format();
+
+ 1:
+ Memo22.Text := FJO.Format();
+
+// 2:
+ else
+ Memo11.Text := FJO.Format();
+ end;
+
+ FJO.Free;
+ FJO := nil;
+ end;
+ end;
+end;
+
+function TForm2.Validation: IDataValidatorJSONResult;
+begin
+ case PageControl1.ActivePageIndex of
+ 0:
+ begin
+ FJO := TJSONObject.ParseJSONValue(Memo1.Text) as TJSONObject;
+
+ Result := ValidationTab1;
+ end;
+ 1:
+ begin
+ FJO := TJSONObject.ParseJSONValue(Memo2.Text) as TJSONObject;
+
+ Result := ValidationTab2;
+ end;
+ else
+ Result := ValidationTab1;
+ end;
+end;
+
+function TForm2.ValidationTab1: IDataValidatorJSONResult;
+begin
+ Result :=
+ TDataValidator.JSON(FJO)
+ .Validate('id')
+ .Key
+ .IsRequired.WithMessage('Informe a key ${key}')
+ .&End
+
+ .Value
+ .&Not.IsEmpty.WithMessage('O ${key} deve ser informado!')
+ .IsJSONNumeric.WithMessage('${key} - ${value} - No do tipo numeric!')
+ .IsGreaterThan(0).WithMessage('O ${key} deve ser maior que zero!')
+ .IsInteger.WithMessage('O ${key} deve ser do tipo inteiro!')
+ .&End
+ .&End
+
+ .Validate(['name', 'description'])
+ .Key
+ .IsRequired.WithMessage('Informe a key ${key}')
+ .&End
+
+ .Value
+ .&Not.IsEmpty.WithMessage('O ${key} deve ser informado!')
+ .IsJSONString.WithMessage('${key} - ${value} - No do tipo string!')
+ .IsAlphaNumeric(TDataValidatorLocaleLanguage.tl_pt_BR, ['-', ',', '/', '\']).WithMessage('${key} - ${value} - No um valor AlphaNumeric!')
+ .&End
+ .&End
+
+ .Validate('price')
+ .Key
+ .IsRequired.WithMessage('Informe a key ${key}')
+ .&End
+
+ .Value
+ .&Not.IsEmpty.WithMessage('O ${key} deve ser informado!')
+ .IsJSONNumeric.WithMessage('${key} - ${value} - No do tipo numeric!')
+ .IsGreaterThan(0).WithMessage('O ${key} deve ser maior que zero!')
+ .&End
+ .&End;
+end;
+
+function TForm2.ValidationTab2: IDataValidatorJSONResult;
+begin
+ Result :=
+ TDataValidator.JSON(FJO)
+ .Validate('id')
+ .Key
+ .IsRequired.WithMessage('Informe a key ${key}')
+ .&End
+
+ .Value
+ .Trim
+ .&Not.IsEmpty.WithMessage('O ${key} deve ser informado!')
+ .IsJSONNumeric.WithMessage('${key} - ${value} - No do tipo numeric!')
+ .IsGreaterThan(0).WithMessage('O ${key} deve ser maior que zero!')
+ .IsInteger.WithMessage('O ${key} deve ser do tipo inteiro!')
+ .&End
+ .&End
+
+ .Validate('customers', 'Cliente')
+ .Key
+ .IsRequired.WithMessage('Informe a key ${key}')
+ .&End
+
+ .Value
+ .IsJSONObject.WithMessage('${key} - No do tipo JSONObject!')
+ .CustomJSONSubValidator(
+ function(const AValue: IDataValidatorJSON; var AMessage: TDataValidatorMessage): Boolean
+ var
+ LJSONResult: IDataValidatorJSONResult;
+ LResult: IDataValidatorResult;
+ begin
+ LJSONResult :=
+ AValue
+ .Validate('id')
+ .Key
+ .IsRequired.WithMessage('Informe a key ${key}')
+ .&End
+
+ .Value
+ .Trim
+ .&Not.IsEmpty.WithMessage('O ${key} deve ser informado!')
+ .IsJSONNumeric.WithMessage('${key} - ${value} - No do tipo numeric!')
+ .IsGreaterThan(0).WithMessage('O ${key} deve ser maior que zero!')
+ .IsInteger.WithMessage('O ${key} deve ser do tipo inteiro!')
+ .&End
+ .&End
+
+ .Validate('name')
+ .Key
+ .IsRequired.WithMessage('Informe a key ${key}')
+ .&End
+
+ .Value
+ .Trim
+ .&Not.IsEmpty.WithMessage('O ${key} deve ser informado!')
+ .IsJSONString.WithMessage('${key} - ${value} - No do tipo string!')
+ .IsAlphaNumeric(TDataValidatorLocaleLanguage.tl_pt_BR, ['-', ',', '/', '\']).WithMessage('${key} - ${value} - No um valor AlphaNumeric!')
+ .&End
+ .&End
+
+ .Validate('gender')
+ .Key
+ .IsRequired.WithMessage('Informe a key ${key}')
+ .&End
+
+ .Value
+ .Trim
+ .&Not.IsEmpty.WithMessage('O ${key} deve ser informado!')
+ .IsJSONString.WithMessage('${key} - ${value} - No do tipo string!')
+ .IsLength(1,1).WithMessage('')
+ .ToUpperCase
+ .Contains(['F', 'M']).WithMessage('${key} - Deve ser somente "F" ou "M" e no ${value}')
+ .&End
+ .&End
+
+ .Validate('birthDate')
+ .Key
+ .IsRequired.WithMessage('Informe a key ${key}')
+ .&End
+
+ .Value
+ .Trim
+ .&Not.IsEmpty.WithMessage('O ${key} deve ser informado!')
+ .IsJSONString.WithMessage('${key} - ${value} - No do tipo string!')
+ .IsLength(10,10).WithMessage('${key} - Deve ter somente 10 caracteres!')
+ .IsDate(False).WithMessage('${key} - ${value} - No uma data vlida!')
+ .&Not.IsDateGreaterThan(Now, False).WithMessage('${key} - ${value} - A data informada no pode ser maior que a data atual!')
+ .&Not.IsDateLessThan(IncYear(Now, -90), False).WithMessage('${key} - ${value} - A data informada no pode ser menor que %s', [FormatDateTime('yyyy-mm-dd', IncYear(Now, -90))])
+ .&End
+ .&End
+
+ .Validate('documents')
+ .Key
+ .IsRequired.WithMessage('Informe a key ${key}')
+ .&End
+
+ .Value
+ .&Not.IsEmpty.WithMessage('O ${key} deve ser informado!')
+ .IsJSONArray.WithMessage('${key} deve ser do tipo JSONArray')
+ .CustomJSONSubValidator(
+ function(const AValue: IDataValidatorJSON; var AMessage: TDataValidatorMessage): Boolean
+ var
+ LJSONResult: IDataValidatorJSONResult;
+ LResult: IDataValidatorResult;
+ begin
+ LJSONResult :=
+ AValue
+ .Validate('type')
+ .Key
+ .IsRequired.WithMessage('Informe a key ${key}')
+ .&End
+
+ .Value
+ .Trim
+ .&Not.IsEmpty.WithMessage('O ${key} deve ser informado!')
+ .IsJSONString.WithMessage('${key} - ${value} - No do tipo string!')
+ .ToUpperCase
+ .IsEquals(['CPF', 'CNPJ']).WithMessage('${key} - Deve ser somente "CPF" ou "CNPJ" e no ${value}')
+ .&End
+ .&End
+
+ .Validate('number')
+ .Key
+ .IsRequired.WithMessage('Informe a key ${key}')
+ .&End
+
+ .Value
+ .Trim
+ .&Not.IsEmpty.WithMessage('O ${key} deve ser informado!')
+ .IsJSONString.WithMessage('${key} - ${value} - No do tipo string!')
+ .IsInteger.WithMessage('${key} - ${value} - Informe somente nmeros!')
+ .&End
+ .&End
+ ;
+
+ LResult := LJSONResult.Check;
+
+ Result := LResult.OK;
+
+ if not Result then
+ AMessage := LResult.Informations.GetItem(0).Messages;
+ end)
+ .&End
+ .&End
+
+ .Validate('phones')
+ .Key
+ .IsRequired.WithMessage('Informe a key ${key}')
+ .&End
+
+ .Value
+ .&Not.IsEmpty.WithMessage('O ${key} deve ser informado!')
+ .IsJSONArray.WithMessage('${key} deve ser do tipo JSONArray')
+ .CustomJSONSubValidator(
+ function(const AValue: IDataValidatorJSON; var AMessage: TDataValidatorMessage): Boolean
+ var
+ LJSONResult: IDataValidatorJSONResult;
+ LResult: IDataValidatorResult;
+ begin
+ LJSONResult :=
+ AValue
+ .Validate('type')
+ .Key
+ .IsRequired.WithMessage('Informe a key ${key}')
+ .&End
+
+ .Value
+ .Trim
+ .&Not.IsEmpty.WithMessage('O ${key} deve ser informado!')
+ .IsJSONString.WithMessage('${key} - ${value} - No do tipo string!')
+ .ToUpperCase
+ .Contains(['PRIMARY', 'SECONDARY']).WithMessage('${key} - Deve ser somente "CPF" ou "CNPJ" e no ${value}')
+ .&End
+ .&End
+
+ .Validate('number')
+ .Key
+ .IsRequired.WithMessage('Informe a key ${key}')
+ .&End
+
+ .Value
+ .Trim
+ .&Not.IsEmpty.WithMessage('O ${key} deve ser informado!')
+ .IsJSONString.WithMessage('${key} - ${value} - No do tipo string!')
+ .IsLength(12,13).WithMessage('${key} - ${value} - Informe um fone com 12 ou 13 digitos!')
+ .IsInteger.WithMessage('${key} - ${value} - Informe somente nmeros!')
+ .&End
+ .&End
+ ;
+
+ LResult := LJSONResult.Check;
+
+ Result := LResult.OK;
+
+ if not Result then
+ AMessage := LResult.Informations.GetItem(0).Messages;
+ end)
+ .&End
+ .&End
+
+ .Validate('email')
+ .Key
+ .IsRequired.WithMessage('Informe a key ${key}')
+ .&End
+
+ .Value
+ .Trim.NormalizeEmail()
+ .&Not.IsEmpty.WithMessage('O ${key} deve ser informado!')
+ .IsJSONString.WithMessage('${key} - ${value} - No do tipo string!')
+ .IsEmail.WithMessage('${key} - ${value} - No um e-mail vlido!')
+ .&End
+ .&End
+
+ .Validate('items')
+ .Key
+ .IsRequired.WithMessage('Informe a key ${key}')
+ .&End
+
+ .Value
+ .IsJSONObject.WithMessage('${key} - No do tipo JSONObject!')
+ .CustomJSONSubValidator(
+ function(const AValue: IDataValidatorJSON; var AMessage: TDataValidatorMessage): Boolean
+ var
+ LJSONResult: IDataValidatorJSONResult;
+ LResult: IDataValidatorResult;
+ begin
+ LJSONResult :=
+ AValue
+ .Validate('product_id')
+ .Key
+ .IsRequired.WithMessage('Informe a key ${key}')
+ .&End
+
+ .Value
+ .Trim
+ .&Not.IsEmpty.WithMessage('O ${key} deve ser informado!')
+ .IsJSONNumeric.WithMessage('${key} - ${value} - No do tipo numeric!')
+ .IsGreaterThan(0).WithMessage('O ${key} deve ser maior que zero!')
+ .IsInteger.WithMessage('O ${key} deve ser do tipo inteiro!')
+ .&End
+ .&End
+
+ .Validate('product_name')
+ .Key
+ .IsRequired.WithMessage('Informe a key ${key}')
+ .&End
+
+ .Value
+ .Trim
+ .&Not.IsEmpty.WithMessage('O ${key} deve ser informado!')
+ .IsJSONString.WithMessage('${key} - ${value} - No do tipo string!')
+ .IsAlphaNumeric(TDataValidatorLocaleLanguage.tl_pt_BR, ['-', ',', '/', '\']).WithMessage('${key} - ${value} - No um valor AlphaNumeric!')
+ .&End
+ .&End
+
+ .Validate('price')
+ .Key
+ .IsRequired.WithMessage('Informe a key ${key}')
+ .&End
+
+ .Value
+ .Trim
+ .&Not.IsEmpty.WithMessage('O ${key} deve ser informado!')
+ .IsNumeric.WithMessage('O ${key} no um valor invlido!')
+ .IsGreaterThan(-1).WithMessage('Informe um valor maior que Zero!')
+ .&End
+ .&End
+
+ .Validate('quantity')
+ .Key
+ .IsRequired.WithMessage('Informe a key ${key}')
+ .&End
+
+ .Value
+ .Trim
+ .&Not.IsEmpty.WithMessage('O ${key} deve ser informado!')
+ .IsNumeric.WithMessage('O ${key} no um valor invlido!')
+ .&End
+ .&End
+ ;
+
+ LResult := LJSONResult.Check;
+
+ Result := LResult.OK;
+
+ if not Result then
+ AMessage := LResult.Informations.GetItem(0).Messages;
+ end)
+ .&End
+ .&End
+ ;
+
+ LResult := LJSONResult.Check;
+
+ Result := LResult.OK;
+
+ if not Result then
+ AMessage := LResult.Informations.GetItem(0).Messages;
+ end)
+ .&End
+ .&End
+end;
+
+procedure TForm2.FormCreate(Sender: TObject);
+begin
+ ReportMemoryLeaksOnShutdown := True;
+
+ PageControl1.ActivePageIndex := 0;
+end;
+
+end.
diff --git a/samples/Model 10 - Horse Middleware/Model10.dpr b/samples/Model 10 - Horse Middleware/Model10.dpr
deleted file mode 100644
index 4197a9b..0000000
--- a/samples/Model 10 - Horse Middleware/Model10.dpr
+++ /dev/null
@@ -1,154 +0,0 @@
-program Model10;
-
-uses
- DataValidator,
- Horse, Horse.Jhonson, System.JSON, System.SysUtils, System.DateUtils;
-
-procedure DataValidatorMiddleware(Req: THorseRequest; Res: THorseResponse; Next: TProc);
-var
- LBody: System.JSON.TJSONObject;
- LValid: IDataValidatorResult;
-begin
- // GetBody
- try
- LBody := Req.Body;
-
- if not Assigned(LBody) then
- begin
- Res.Status(THTTPStatus.BadRequest).Send('JSON body invlido!');
- raise EHorseCallbackInterrupted.Create;
- end;
- except
- on E: Exception do
- begin
- Res.Status(THTTPStatus.BadRequest).Send('JSON body invlido! Message: ' + E.Message);
- raise EHorseCallbackInterrupted.Create;
- end;
- end;
-
- // Validation
- LValid :=
-
- TDataValidator.JSON(LBody)
- .Validate('nome')
- .Key
- .IsRequired.WithMessage('Key "nome" no informado!')
- .&End
-
- .Value
- .Trim
- .&Not.IsEmpty.WithMessage('O campo nome no foi preenchido!')
- .IsAlpha(TDataValidatorLocaleLanguage.tl_pt_BR).WithMessage('O campo nome no pode possuir caracters especiais!')
- .IsLength(3, 100).WithMessage('O campo nome deve ter no mnimo 3 caracters e no mzimo 100')
- .&End
- .&End
-
- .Validate('email')
- .Key
- .IsRequired.WithMessage('Key "email" no informado!')
- .&End
-
- .Value
- .Trim
- .&Not.IsEmpty.WithMessage('Informe o e-mail!')
- .IsLength(6, 100).WithMessage('Informe um e-mail maior que 5 caracteres!')
- .NormalizeEmail(True, False).IsEmail.WithMessage('E-mail invlido!')
- .CustomValue(
- function(const AValue: string): Boolean
- begin
- // Recebe o valor no AValue para analisar e fazer o que for necessrio
- //
- // Ex:
- // Consulta no banco verifica se esse email j existe;
- //
- // Result -> True = significa tudo certo! - False = significa que tem algum problema
-
- Result := AValue = 'developer.dlio@gmail.com';
-
- end).WithMessage('E-mail j cadastrado!')
- .&End
- .&End
-
- .Validate('data_nascimento')
- .Key
- .IsRequired.WithMessage('Key "data_nascimento" no informado!')
- .&End
-
- .Value
- .Trim
- .&Not.IsEmpty.WithMessage('Informe a data de nascimento!')
- .IsDate.WithMessage('Data de nascimento invlida!')
- .IsDateLessThan(Now).WithMessage('A data de nascimento no pode ser maior que a data atual!')
- .IsDateGreaterThan(IncYear(Now, -100)).WithMessage('A data de nascimento no pode ser menor que 100 anos atrs!')
- .&End
- .&End
-
- .Validate('telefone')
- .Key
- .IsRequired.WithMessage('Key "telefone" no informado!')
- .&End
-
- .Value
- .Trim
- .&Not.IsEmpty.WithMessage('Informe o telefone!')
- .IsPhoneNumber(TDataValidatorLocaleLanguage.tl_pt_BR).WithMessage('Nmero de telefone invlido!')
- .&End
- .&End
-
- .Validate('cpf')
- .Key
- .IsRequired.WithMessage('Key "cpf" no informado!')
- .&End
-
- .Value
- .Trim
- .&Not.IsEmpty.WithMessage('Informe o CPF!')
- .IsLength(14, 14).WithMessage('Informe corretamente todos os dgitos do CPF!')
- .OnlyNumbers.IsCPF.WithMessage('CPF invlido!')
- .&End
- .&End
-
- .Check;
-
- if LValid.OK then
- Next
- else
- begin
- Res.Status(THTTPStatus.BadRequest).Send(LValid.Informations.Message);
- raise EHorseCallbackInterrupted.Create;
- end;
-end;
-
-procedure ControllerRegister(Req: THorseRequest; Res: THorseResponse; Next: TProc);
-var
- LBody: TJSONObject;
-begin
- LBody := Req.Body;
-
- // FAz o que quiser, pois foi validado no middleware desta rota
- // se chegou at aqui, significa que est tudo certo
-
- Res.Send(LBody);
-end;
-
-begin
-// Router:
-// POST http://localhost:9000/register
-
-// Body
-// JSON Test
-{
- "nome":"Danilo Lucas",
- "email":"developer.dlio@gmail.com",
- "data_nascimento":"23/08/1994",
- "telefone":"48999999999",
- "cpf":"012.345.678-90"
-}
-
- THorse.Use(Jhonson());
-
- THorse.Post('/register', DataValidatorMiddleware, ControllerRegister);
-
- THorse.Listen(9000);
-
-end.
diff --git a/samples/Model 10 - Horse Middleware/Model10.dproj b/samples/Model 10 - Horse Middleware/Model10.dproj
deleted file mode 100644
index f2d3d4e..0000000
--- a/samples/Model 10 - Horse Middleware/Model10.dproj
+++ /dev/null
@@ -1,1011 +0,0 @@
-
-
- {7EC5A48C-EC1D-43B5-A589-B7677C774BE0}
- 19.2
- None
- True
- Debug
- Win32
- 1
- Console
- Model10.dpr
-
-
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Cfg_1
- true
- true
-
-
- true
- Base
- true
-
-
- .\$(Platform)\$(Config)
- .\$(Platform)\$(Config)
- false
- false
- false
- false
- false
- System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)
- Model10
- modules\.dcp;modules\.dcu;modules;modules\horse\src;modules\jhonson\src;$(DCC_UnitSearchPath)
-
-
- DBXSqliteDriver;RESTComponents;DBXInterBaseDriver;emsclientfiredac;tethering;DataSnapFireDAC;bindcompfmx;FmxTeeUI;fmx;FireDACIBDriver;FireDACDBXDriver;dbexpress;IndyCore;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;soapserver;bindengine;CloudService;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;FireDACSqliteDriver;ibmonitor;FMXTee;soaprtl;DbxCommonDriver;ibxpress;xmlrtl;soapmidas;DataSnapNativeClient;FireDACDSDriver;rtl;DbxClientDriver;ibxbindings;CustomIPTransport;bindcomp;IndyIPClient;dbxcds;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;$(DCC_UsePackage)
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_36x36.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_48x48.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_72x72.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_96x96.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_144x144.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_426x320.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_470x320.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_640x480.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_960x720.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_24x24.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_36x36.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_48x48.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_72x72.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_96x96.png
- android-support-v4.dex.jar;cloud-messaging.dex.jar;com-google-android-gms.play-services-ads-base.17.2.0.dex.jar;com-google-android-gms.play-services-ads-identifier.16.0.0.dex.jar;com-google-android-gms.play-services-ads-lite.17.2.0.dex.jar;com-google-android-gms.play-services-ads.17.2.0.dex.jar;com-google-android-gms.play-services-analytics-impl.16.0.8.dex.jar;com-google-android-gms.play-services-analytics.16.0.8.dex.jar;com-google-android-gms.play-services-base.16.0.1.dex.jar;com-google-android-gms.play-services-basement.16.2.0.dex.jar;com-google-android-gms.play-services-gass.17.2.0.dex.jar;com-google-android-gms.play-services-identity.16.0.0.dex.jar;com-google-android-gms.play-services-maps.16.1.0.dex.jar;com-google-android-gms.play-services-measurement-base.16.4.0.dex.jar;com-google-android-gms.play-services-measurement-sdk-api.16.4.0.dex.jar;com-google-android-gms.play-services-stats.16.0.1.dex.jar;com-google-android-gms.play-services-tagmanager-v4-impl.16.0.8.dex.jar;com-google-android-gms.play-services-tasks.16.0.1.dex.jar;com-google-android-gms.play-services-wallet.16.0.1.dex.jar;com-google-firebase.firebase-analytics.16.4.0.dex.jar;com-google-firebase.firebase-common.16.1.0.dex.jar;com-google-firebase.firebase-iid-interop.16.0.1.dex.jar;com-google-firebase.firebase-iid.17.1.1.dex.jar;com-google-firebase.firebase-measurement-connector.17.0.1.dex.jar;com-google-firebase.firebase-messaging.17.5.0.dex.jar;fmx.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar
-
-
- DBXSqliteDriver;RESTComponents;DBXInterBaseDriver;emsclientfiredac;tethering;DataSnapFireDAC;bindcompfmx;FmxTeeUI;fmx;FireDACIBDriver;FireDACDBXDriver;dbexpress;IndyCore;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;soapserver;bindengine;CloudService;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;FireDACSqliteDriver;ibmonitor;FMXTee;soaprtl;DbxCommonDriver;ibxpress;xmlrtl;soapmidas;DataSnapNativeClient;FireDACDSDriver;rtl;DbxClientDriver;ibxbindings;CustomIPTransport;bindcomp;IndyIPClient;dbxcds;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;$(DCC_UsePackage)
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_36x36.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_48x48.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_72x72.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_96x96.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_144x144.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_426x320.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_470x320.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_640x480.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_960x720.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_24x24.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_36x36.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_48x48.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_72x72.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_96x96.png
- android-support-v4.dex.jar;cloud-messaging.dex.jar;com-google-android-gms.play-services-ads-base.17.2.0.dex.jar;com-google-android-gms.play-services-ads-identifier.16.0.0.dex.jar;com-google-android-gms.play-services-ads-lite.17.2.0.dex.jar;com-google-android-gms.play-services-ads.17.2.0.dex.jar;com-google-android-gms.play-services-analytics-impl.16.0.8.dex.jar;com-google-android-gms.play-services-analytics.16.0.8.dex.jar;com-google-android-gms.play-services-base.16.0.1.dex.jar;com-google-android-gms.play-services-basement.16.2.0.dex.jar;com-google-android-gms.play-services-gass.17.2.0.dex.jar;com-google-android-gms.play-services-identity.16.0.0.dex.jar;com-google-android-gms.play-services-maps.16.1.0.dex.jar;com-google-android-gms.play-services-measurement-base.16.4.0.dex.jar;com-google-android-gms.play-services-measurement-sdk-api.16.4.0.dex.jar;com-google-android-gms.play-services-stats.16.0.1.dex.jar;com-google-android-gms.play-services-tagmanager-v4-impl.16.0.8.dex.jar;com-google-android-gms.play-services-tasks.16.0.1.dex.jar;com-google-android-gms.play-services-wallet.16.0.1.dex.jar;com-google-firebase.firebase-analytics.16.4.0.dex.jar;com-google-firebase.firebase-common.16.1.0.dex.jar;com-google-firebase.firebase-iid-interop.16.0.1.dex.jar;com-google-firebase.firebase-iid.17.1.1.dex.jar;com-google-firebase.firebase-measurement-connector.17.0.1.dex.jar;com-google-firebase.firebase-messaging.17.5.0.dex.jar;fmx.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar
-
-
- DBXSqliteDriver;RESTComponents;fmxase;DBXInterBaseDriver;emsclientfiredac;tethering;DataSnapFireDAC;bindcompfmx;FmxTeeUI;fmx;FireDACIBDriver;FireDACDBXDriver;dbexpress;IndyCore;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;soapserver;bindengine;CloudService;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;FireDACSqliteDriver;ibmonitor;FMXTee;soaprtl;DbxCommonDriver;ibxpress;xmlrtl;soapmidas;DataSnapNativeClient;FireDACDSDriver;rtl;DbxClientDriver;ibxbindings;CustomIPTransport;bindcomp;IndyIPClient;dbxcds;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;$(DCC_UsePackage)
-
-
- DBXSqliteDriver;RESTComponents;fmxase;DBXInterBaseDriver;emsclientfiredac;tethering;DataSnapFireDAC;bindcompfmx;FmxTeeUI;fmx;FireDACIBDriver;FireDACDBXDriver;dbexpress;IndyCore;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;soapserver;bindengine;CloudService;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;FireDACSqliteDriver;ibmonitor;FMXTee;soaprtl;DbxCommonDriver;ibxpress;xmlrtl;soapmidas;DataSnapNativeClient;FireDACDSDriver;rtl;DbxClientDriver;ibxbindings;CustomIPTransport;bindcomp;IndyIPClient;dbxcds;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;$(DCC_UsePackage)
-
-
- RESTComponents;emsclientfiredac;DataSnapFireDAC;FireDACADSDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;inetdb;emsedge;fmx;FireDACIBDriver;dbexpress;IndyCore;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;DataSnapConnectors;soapserver;bindengine;CloudService;FireDACOracleDriver;FireDACMySQLDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;IndySystem;FireDACDb2Driver;FireDACInfxDriver;FireDAC;emshosting;FireDACSqliteDriver;FireDACPgDriver;FireDACASADriver;FireDACTDataDriver;soaprtl;DbxCommonDriver;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;rtl;emsserverresource;DbxClientDriver;CustomIPTransport;bindcomp;dbxcds;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;dbrtl;IndyProtocols;FireDACMongoDBDriver;DataSnapServerMidas;$(DCC_UsePackage)
-
-
- DBXSqliteDriver;RESTComponents;fmxase;DBXInterBaseDriver;emsclientfiredac;tethering;DataSnapFireDAC;FireDACMSSQLDriver;bindcompfmx;DBXOracleDriver;inetdb;FmxTeeUI;fmx;FireDACIBDriver;fmxdae;FireDACDBXDriver;dbexpress;IndyCore;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;soapserver;bindengine;DBXMySQLDriver;CloudService;FireDACOracleDriver;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;ibxpress;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;FireDACDSDriver;rtl;DbxClientDriver;ibxbindings;DBXSybaseASADriver;CustomIPTransport;bindcomp;DBXInformixDriver;IndyIPClient;dbxcds;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;inetdbxpress;FireDACMongoDBDriver;DataSnapServerMidas;$(DCC_UsePackage)
- true
-
-
- DBXSqliteDriver;RESTComponents;fmxase;DBXDb2Driver;DBXInterBaseDriver;vclactnband;vclFireDAC;bindcompvclsmp;emsclientfiredac;tethering;svnui;DataSnapFireDAC;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;svn;DBXOracleDriver;inetdb;FmxTeeUI;emsedge;fmx;FireDACIBDriver;fmxdae;vcledge;vclib;FireDACDBXDriver;dbexpress;IndyCore;vclx;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;vclie;bindengine;DBXMySQLDriver;CloudService;FireDACOracleDriver;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;vcl;IndyIPServer;DBXSybaseASEDriver;IndySystem;FireDACDb2Driver;bindcompvclwinx;dsnapcon;madExcept_;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;madBasic_;TeeDB;FireDAC;emshosting;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;ibxpress;Tee;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;FireDACDSDriver;rtl;emsserverresource;DbxClientDriver;ibxbindings;DBXSybaseASADriver;madDisAsm_;CustomIPTransport;vcldsnap;bindcomp;appanalytics;DBXInformixDriver;IndyIPClient;bindcompvcl;TeeUI;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;inetdbxpress;FireDACMongoDBDriver;DataSnapServerMidas;$(DCC_UsePackage)
- Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
- Debug
- CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=
- 1033
- true
- $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png
- $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png
-
-
- DBXSqliteDriver;RESTComponents;fmxase;DBXDb2Driver;DBXInterBaseDriver;vclactnband;vclFireDAC;bindcompvclsmp;emsclientfiredac;tethering;DataSnapFireDAC;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;DBXOracleDriver;inetdb;FmxTeeUI;emsedge;fmx;FireDACIBDriver;fmxdae;vcledge;vclib;FireDACDBXDriver;dbexpress;IndyCore;vclx;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;vclie;bindengine;DBXMySQLDriver;CloudService;FireDACOracleDriver;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;vcl;IndyIPServer;DBXSybaseASEDriver;IndySystem;FireDACDb2Driver;bindcompvclwinx;dsnapcon;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;TeeDB;FireDAC;emshosting;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;ibxpress;Tee;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;FireDACDSDriver;rtl;emsserverresource;DbxClientDriver;ibxbindings;DBXSybaseASADriver;CustomIPTransport;vcldsnap;bindcomp;appanalytics;DBXInformixDriver;IndyIPClient;bindcompvcl;TeeUI;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;inetdbxpress;FireDACMongoDBDriver;DataSnapServerMidas;$(DCC_UsePackage)
- true
- $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png
- $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png
-
-
- DEBUG;$(DCC_Define)
- true
- false
- true
- true
- true
-
-
- false
- ..\..\src\core;..\..\src\validators;..\..\src\sanitializators;$(DCC_UnitSearchPath)
- 1033
- (None)
-
-
- false
- RELEASE;$(DCC_Define)
- 0
- 0
-
-
-
- MainSource
-
-
- Cfg_2
- Base
-
-
- Base
-
-
- Cfg_1
- Base
-
-
-
- Delphi.Personality.12
- Application
-
-
-
- Model10.dpr
-
-
- Embarcadero C++Builder Office 2000 Servers Package
- Embarcadero C++Builder Office XP Servers Package
- Microsoft Office 2000 Sample Automation Server Wrapper Components
- Microsoft Office XP Sample Automation Server Wrapper Components
-
-
-
-
-
- true
-
-
-
-
- true
-
-
-
-
- true
-
-
-
-
- Model10.exe
- true
-
-
-
-
- 1
-
-
- Contents\MacOS
- 1
-
-
- 0
-
-
-
-
- classes
- 1
-
-
- classes
- 1
-
-
-
-
- res\xml
- 1
-
-
- res\xml
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
-
-
- library\lib\armeabi
- 1
-
-
- library\lib\armeabi
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
-
-
- library\lib\mips
- 1
-
-
- library\lib\mips
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
- library\lib\arm64-v8a
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
-
-
- res\drawable
- 1
-
-
- res\drawable
- 1
-
-
-
-
- res\values
- 1
-
-
- res\values
- 1
-
-
-
-
- res\values-v21
- 1
-
-
- res\values-v21
- 1
-
-
-
-
- res\values
- 1
-
-
- res\values
- 1
-
-
-
-
- res\drawable
- 1
-
-
- res\drawable
- 1
-
-
-
-
- res\drawable-xxhdpi
- 1
-
-
- res\drawable-xxhdpi
- 1
-
-
-
-
- res\drawable-xxxhdpi
- 1
-
-
- res\drawable-xxxhdpi
- 1
-
-
-
-
- res\drawable-ldpi
- 1
-
-
- res\drawable-ldpi
- 1
-
-
-
-
- res\drawable-mdpi
- 1
-
-
- res\drawable-mdpi
- 1
-
-
-
-
- res\drawable-hdpi
- 1
-
-
- res\drawable-hdpi
- 1
-
-
-
-
- res\drawable-xhdpi
- 1
-
-
- res\drawable-xhdpi
- 1
-
-
-
-
- res\drawable-mdpi
- 1
-
-
- res\drawable-mdpi
- 1
-
-
-
-
- res\drawable-hdpi
- 1
-
-
- res\drawable-hdpi
- 1
-
-
-
-
- res\drawable-xhdpi
- 1
-
-
- res\drawable-xhdpi
- 1
-
-
-
-
- res\drawable-xxhdpi
- 1
-
-
- res\drawable-xxhdpi
- 1
-
-
-
-
- res\drawable-xxxhdpi
- 1
-
-
- res\drawable-xxxhdpi
- 1
-
-
-
-
- res\drawable-small
- 1
-
-
- res\drawable-small
- 1
-
-
-
-
- res\drawable-normal
- 1
-
-
- res\drawable-normal
- 1
-
-
-
-
- res\drawable-large
- 1
-
-
- res\drawable-large
- 1
-
-
-
-
- res\drawable-xlarge
- 1
-
-
- res\drawable-xlarge
- 1
-
-
-
-
- res\values
- 1
-
-
- res\values
- 1
-
-
-
-
- 1
-
-
- Contents\MacOS
- 1
-
-
- 0
-
-
-
-
- Contents\MacOS
- 1
- .framework
-
-
- Contents\MacOS
- 1
- .framework
-
-
- 0
-
-
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- Contents\MacOS
- 1
- .dylib
-
-
- Contents\MacOS
- 1
- .dylib
-
-
- 0
- .dll;.bpl
-
-
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- Contents\MacOS
- 1
- .dylib
-
-
- Contents\MacOS
- 1
- .dylib
-
-
- 0
- .bpl
-
-
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- Contents\Resources\StartUp\
- 0
-
-
- Contents\Resources\StartUp\
- 0
-
-
- 0
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- 1
-
-
- 1
-
-
-
-
- ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
- 1
-
-
- ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
- 1
-
-
-
-
- ..\
- 1
-
-
- ..\
- 1
-
-
-
-
- 1
-
-
- 1
-
-
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen
- 64
-
-
- ..\$(PROJECTNAME).launchscreen
- 64
-
-
-
-
- 1
-
-
- 1
-
-
- 1
-
-
-
-
- ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
- 1
-
-
-
-
- ..\
- 1
-
-
- ..\
- 1
-
-
-
-
- Contents
- 1
-
-
- Contents
- 1
-
-
-
-
- Contents\Resources
- 1
-
-
- Contents\Resources
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
- library\lib\arm64-v8a
- 1
-
-
- 1
-
-
- 1
-
-
- 1
-
-
- 1
-
-
- Contents\MacOS
- 1
-
-
- Contents\MacOS
- 1
-
-
- 0
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
-
-
- 1
-
-
- 1
-
-
-
-
- Assets
- 1
-
-
- Assets
- 1
-
-
-
-
- Assets
- 1
-
-
- Assets
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- False
- False
- False
- False
- False
- False
- True
- False
-
-
- 12
-
-
-
-
-
diff --git a/samples/Model 10 - Horse Middleware/boss-lock.json b/samples/Model 10 - Horse Middleware/boss-lock.json
deleted file mode 100644
index 51851a9..0000000
--- a/samples/Model 10 - Horse Middleware/boss-lock.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "hash": "d41d8cd98f00b204e9800998ecf8427e",
- "updated": "2021-07-13T15:54:02.4357378-03:00",
- "installedModules": {
- "github.com/hashload/horse": {
- "name": "horse",
- "version": "2.0.13",
- "hash": "985da2054d3c705bc211797c653e47ba",
- "artifacts": {},
- "failed": false,
- "changed": false
- },
- "github.com/hashload/jhonson": {
- "name": "jhonson",
- "version": "1.1.2",
- "hash": "85d9b3c97b5144448440d7d26bdd16de",
- "artifacts": {},
- "failed": false,
- "changed": false
- }
- }
-}
\ No newline at end of file
diff --git a/samples/Model 10 - Horse Middleware/boss.json b/samples/Model 10 - Horse Middleware/boss.json
deleted file mode 100644
index aea6037..0000000
--- a/samples/Model 10 - Horse Middleware/boss.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "name": "Model 10 - Horse Middleware",
- "description": "",
- "version": "1.0.0",
- "homepage": "",
- "mainsrc": "./",
- "projects": [],
- "dependencies": {
- "github.com/hashload/horse": "^2.0.13",
- "github.com/hashload/jhonson": "^1.1.2"
- }
-}
\ No newline at end of file
diff --git a/samples/Model 2 - Schema/Model2.dpr b/samples/Model 2 - Schema/Model2.dpr
deleted file mode 100644
index 432a101..0000000
--- a/samples/Model 2 - Schema/Model2.dpr
+++ /dev/null
@@ -1,16 +0,0 @@
-program Model2;
-
-uses
- Vcl.Forms,
- UModel2 in 'UModel2.pas' {Form1};
-
-{$R *.res}
-
-begin
- ReportMemoryLeaksOnShutdown := True;
-
- Application.Initialize;
- Application.MainFormOnTaskbar := True;
- Application.CreateForm(TForm1, Form1);
- Application.Run;
-end.
diff --git a/samples/Model 2 - Schema/UModel2.dfm b/samples/Model 2 - Schema/UModel2.dfm
deleted file mode 100644
index d84111c..0000000
--- a/samples/Model 2 - Schema/UModel2.dfm
+++ /dev/null
@@ -1,74 +0,0 @@
-object Form1: TForm1
- Left = 0
- Top = 0
- Caption = 'Form '
- ClientHeight = 527
- ClientWidth = 388
- Color = clBtnFace
- Font.Charset = DEFAULT_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'Tahoma'
- Font.Style = []
- OldCreateOrder = False
- PixelsPerInch = 96
- TextHeight = 13
- object LabeledEditNome: TLabeledEdit
- Left = 8
- Top = 24
- Width = 121
- Height = 21
- EditLabel.Width = 27
- EditLabel.Height = 13
- EditLabel.Caption = 'Nome'
- TabOrder = 0
- end
- object btnValidarTodos: TButton
- Left = 8
- Top = 51
- Width = 177
- Height = 41
- Caption = 'Validar todos os campos'
- TabOrder = 3
- OnClick = btnValidarTodosClick
- end
- object Memo1: TMemo
- Left = 0
- Top = 98
- Width = 388
- Height = 429
- Align = alBottom
- Anchors = [akLeft, akTop, akRight, akBottom]
- ReadOnly = True
- TabOrder = 5
- end
- object btnValidar: TButton
- Left = 206
- Top = 51
- Width = 177
- Height = 41
- Caption = 'Validar '
- TabOrder = 4
- OnClick = btnValidarClick
- end
- object LabeledEditApelido: TLabeledEdit
- Left = 135
- Top = 24
- Width = 121
- Height = 21
- EditLabel.Width = 35
- EditLabel.Height = 13
- EditLabel.Caption = 'Apelido'
- TabOrder = 1
- end
- object LabeledEditRazaoSocial: TLabeledEdit
- Left = 262
- Top = 24
- Width = 121
- Height = 21
- EditLabel.Width = 60
- EditLabel.Height = 13
- EditLabel.Caption = 'Razao Social'
- TabOrder = 2
- end
-end
diff --git a/samples/Model 2 - Schema/UModel2.pas b/samples/Model 2 - Schema/UModel2.pas
deleted file mode 100644
index 9232a3c..0000000
--- a/samples/Model 2 - Schema/UModel2.pas
+++ /dev/null
@@ -1,90 +0,0 @@
-unit UModel2;
-
-interface
-
-uses
- DataValidator,
-
- Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
- Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls;
-
-type
- TForm1 = class(TForm)
- LabeledEditNome: TLabeledEdit;
- btnValidarTodos: TButton;
- Memo1: TMemo;
- btnValidar: TButton;
- LabeledEditApelido: TLabeledEdit;
- LabeledEditRazaoSocial: TLabeledEdit;
- procedure btnValidarTodosClick(Sender: TObject);
- procedure btnValidarClick(Sender: TObject);
- private
- { Private declarations }
- function SchemaNome(const AField: string): IDataValidatorSchemaContext;
- public
- { Public declarations }
- function Valid: IDataValidatorValueResult;
- procedure ShowResult(const AResult: IDataValidatorResult);
- end;
-
-var
- Form1: TForm1;
-
-implementation
-
-{$R *.dfm}
-
-
-procedure TForm1.btnValidarClick(Sender: TObject);
-begin
- ShowResult(Valid.Check);
-end;
-
-procedure TForm1.btnValidarTodosClick(Sender: TObject);
-begin
- ShowResult(Valid.CheckAll);
-end;
-
-function TForm1.SchemaNome(const AField: string): IDataValidatorSchemaContext;
-begin
- Result :=
- TDataValidator.Schema
- .Validate
- .Trim
- .&Not.IsEmpty.WithMessage(Format('Preencha o campo %s !', [AField])) // No pode ser vazio
- .IsLength(0, 10).WithMessage(Format('O campo %s deve conter no mximo 10 caracteres!', [AField]))
- .IsAlpha(TDataValidatorLocaleLanguage.tl_pt_BR).WithMessage(Format('O campo %s possui caracteres invlidos!', [AField]))
- .&End;
-end;
-
-procedure TForm1.ShowResult(const AResult: IDataValidatorResult);
-begin
- Memo1.Clear;
-
- if AResult.OK then
- Exit;
-
- Memo1.Text := AResult.Informations.Message;
- Memo1.Lines.Add(Format('Value validate: %s', [AResult.Informations.GetItem(0).Value]));
- Memo1.Lines.Add(Format('Total errors: %d', [AResult.Informations.Count]));
-end;
-
-function TForm1.Valid: IDataValidatorValueResult;
-begin
- Result := TDataValidator.Values
-
- .Validate(LabeledEditNome.Text)
- .AddSchema(SchemaNome('Nome'))
- .&End
-
- .Validate(LabeledEditApelido.Text)
- .AddSchema(SchemaNome('Apelido'))
- .IsUppercase.WithMessage('O apelido (${value}) deve ser digitado tudo em maiscula!') // Add outra validao
- .&End
-
- .Validate(LabeledEditRazaoSocial.Text)
- .AddSchema(SchemaNome('Razao Social'))
- .&End
-end;
-
-end.
diff --git a/samples/Model 3 - Sanitize/Model3.dpr b/samples/Model 3 - Sanitize/Model3.dpr
deleted file mode 100644
index 197822b..0000000
--- a/samples/Model 3 - Sanitize/Model3.dpr
+++ /dev/null
@@ -1,16 +0,0 @@
-program Model3;
-
-uses
- Vcl.Forms,
- UModel3 in 'UModel3.pas' {Form1};
-
-{$R *.res}
-
-begin
- ReportMemoryLeaksOnShutdown := True;
-
- Application.Initialize;
- Application.MainFormOnTaskbar := True;
- Application.CreateForm(TForm1, Form1);
- Application.Run;
-end.
diff --git a/samples/Model 3 - Sanitize/UModel3.dfm b/samples/Model 3 - Sanitize/UModel3.dfm
deleted file mode 100644
index f2d38cc..0000000
--- a/samples/Model 3 - Sanitize/UModel3.dfm
+++ /dev/null
@@ -1,69 +0,0 @@
-object Form1: TForm1
- Left = 0
- Top = 0
- Caption = 'Form '
- ClientHeight = 527
- ClientWidth = 388
- Color = clBtnFace
- Font.Charset = DEFAULT_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'Tahoma'
- Font.Style = []
- OldCreateOrder = False
- PixelsPerInch = 96
- TextHeight = 13
- object LabeledEditEmail: TLabeledEdit
- Left = 8
- Top = 24
- Width = 372
- Height = 21
- CharCase = ecUpperCase
- EditLabel.Width = 28
- EditLabel.Height = 13
- EditLabel.Caption = 'E-mail'
- TabOrder = 0
- Text = 'DEVELOPER.DLIO@GMAIL.COM'
- end
- object btnSanitize: TButton
- Left = 8
- Top = 155
- Width = 372
- Height = 41
- Caption = 'Sanitize'
- TabOrder = 1
- OnClick = btnSanitizeClick
- end
- object Memo1: TMemo
- Left = 0
- Top = 202
- Width = 388
- Height = 325
- Align = alBottom
- Anchors = [akLeft, akTop, akRight, akBottom]
- ReadOnly = True
- TabOrder = 2
- end
- object LabeledEditBase64ToDecode: TLabeledEdit
- Left = 8
- Top = 80
- Width = 372
- Height = 21
- EditLabel.Width = 89
- EditLabel.Height = 13
- EditLabel.Caption = 'Base64 To Decode'
- TabOrder = 3
- Text = 'QWNlc3NlOiBodHRwczovL2dpdGh1Yi5jb20vZGxpb2NvZGU='
- end
- object LabeledEditBase64ToEncode: TLabeledEdit
- Left = 8
- Top = 128
- Width = 372
- Height = 21
- EditLabel.Width = 91
- EditLabel.Height = 13
- EditLabel.Caption = 'Base64 To Encode '
- TabOrder = 4
- Text = 'Minha Mensagem'
- end
-end
diff --git a/samples/Model 3 - Sanitize/UModel3.pas b/samples/Model 3 - Sanitize/UModel3.pas
deleted file mode 100644
index fe4a680..0000000
--- a/samples/Model 3 - Sanitize/UModel3.pas
+++ /dev/null
@@ -1,80 +0,0 @@
-unit UModel3;
-
-interface
-
-uses
- DataValidator,
-
- Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
- Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls;
-
-type
- TForm1 = class(TForm)
- LabeledEditEmail: TLabeledEdit;
- btnSanitize: TButton;
- Memo1: TMemo;
- LabeledEditBase64ToDecode: TLabeledEdit;
- LabeledEditBase64ToEncode: TLabeledEdit;
- procedure btnSanitizeClick(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- function Valid: IDataValidatorValueResult;
- procedure ShowResult(const AResult: IDataValidatorResult);
- end;
-
-var
- Form1: TForm1;
-
-implementation
-
-{$R *.dfm}
-
-function TForm1.Valid: IDataValidatorValueResult;
-begin
- Result := TDataValidator.Values
-
- .Validate(LabeledEditEmail.Text).Execute(LabeledEditEmail.SetFocus)
- .Trim.NormalizeEmail
- .IsEmail.WithMessage('E-mail invlido')
- .&End
-
- .Validate(LabeledEditBase64ToDecode.Text).Execute(LabeledEditBase64ToDecode.SetFocus)
- .Trim
- .&Not.IsEmpty.WithMessage('Base64ToDecode no pode ser vazio!')
- .IsBase64.WithMessage('No um valor Base64 vlido!')
- .ToBase64Decode
- .&End
-
- .Validate(LabeledEditBase64ToEncode.Text).Execute(LabeledEditBase64ToEncode.SetFocus)
- .&Not.IsEmpty.WithMessage('Base64ToEncode no pode ser vazio!')
- .ToBase64Encode
- .&End;
-end;
-
-procedure TForm1.btnSanitizeClick(Sender: TObject);
-begin
- ShowResult(Valid.CheckAll);
-end;
-
-procedure TForm1.ShowResult(const AResult: IDataValidatorResult);
-begin
- Memo1.Clear;
-
- if AResult.OK then
- begin
- Memo1.Lines.Add(Format('Value Validate 1: %s', [AResult.Values[0]])); // Recupera o valor da 1 validao
- Memo1.Lines.Add(Format('Value Validate 2: %s', [AResult.Values[1]])); // Recupera o valor da 2 validao
- Memo1.Lines.Add(Format('Value Validate 3: %s', [AResult.Values[2]])); // Recupera o valor da 3 validao
-
- Exit;
- end;
-
- Memo1.Text := AResult.Informations.Message;
- Memo1.Lines.Add(Format('Total errors: %d', [AResult.Informations.Count]));
-
- AResult.Informations.GetItem(0).OnExecute; // Executa o que foi informado no validate execute
-end;
-
-end.
diff --git a/samples/Model 4 - JSON/Model4.dpr b/samples/Model 4 - JSON/Model4.dpr
deleted file mode 100644
index b3c9c33..0000000
--- a/samples/Model 4 - JSON/Model4.dpr
+++ /dev/null
@@ -1,18 +0,0 @@
-program Model4;
-
-uses
- Vcl.Forms,
- UModel4 in 'UModel4.pas' {Form1};
-
-{$R *.res}
-
-
-begin
- ReportMemoryLeaksOnShutdown := True;
-
- Application.Initialize;
- Application.MainFormOnTaskbar := True;
- Application.CreateForm(TForm1, Form1);
- Application.Run;
-
-end.
diff --git a/samples/Model 4 - JSON/UModel4.dfm b/samples/Model 4 - JSON/UModel4.dfm
deleted file mode 100644
index 903d3d0..0000000
--- a/samples/Model 4 - JSON/UModel4.dfm
+++ /dev/null
@@ -1,68 +0,0 @@
-object Form1: TForm1
- Left = 0
- Top = 0
- Caption = 'Form '
- ClientHeight = 666
- ClientWidth = 388
- Color = clBtnFace
- Font.Charset = DEFAULT_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'Tahoma'
- Font.Style = []
- OldCreateOrder = False
- PixelsPerInch = 96
- TextHeight = 13
- object MemoJSON: TMemo
- Left = 0
- Top = 44
- Width = 388
- Height = 161
- Align = alTop
- Lines.Strings = (
- '{'
- ' "nome": "DLIO Code",'
- ' "base64":"QWNlc3NlOiBodHRwczovL2dpdGh1Yi5jb20vZGxpb2NvZGU=",'
- ' "emaill": "developer.dlio@gmail.com",'
- ' "data_cadastro": "2021-07-20T03:00:00.0Z"'
- '}')
- TabOrder = 0
- end
- object MemoResult: TMemo
- Left = 0
- Top = 205
- Width = 388
- Height = 218
- Align = alTop
- ReadOnly = True
- TabOrder = 1
- end
- object PanelTop: TPanel
- Left = 0
- Top = 0
- Width = 388
- Height = 44
- Align = alTop
- TabOrder = 2
- object btnValidate: TButton
- Left = 1
- Top = 1
- Width = 386
- Height = 41
- Align = alTop
- Caption = 'Validate'
- TabOrder = 0
- OnClick = btnValidateClick
- end
- end
- object MemoJSONResult: TMemo
- Left = 0
- Top = 423
- Width = 388
- Height = 243
- Align = alClient
- Lines.Strings = (
- 'MemoJSONResult')
- TabOrder = 3
- end
-end
diff --git a/samples/Model 4 - JSON/UModel4.pas b/samples/Model 4 - JSON/UModel4.pas
deleted file mode 100644
index 8b458a7..0000000
--- a/samples/Model 4 - JSON/UModel4.pas
+++ /dev/null
@@ -1,111 +0,0 @@
-unit UModel4;
-
-interface
-
-uses
- DataValidator,
-
- Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
- Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls, System.JSON;
-
-type
- TForm1 = class(TForm)
- MemoJSON: TMemo;
- MemoResult: TMemo;
- PanelTop: TPanel;
- btnValidate: TButton;
- MemoJSONResult: TMemo;
- procedure btnValidateClick(Sender: TObject);
- private
- { Private declarations }
- function SchemaNome(const AField: string): IDataValidatorSchemaContext;
- public
- { Public declarations }
- end;
-
-var
- Form1: TForm1;
-
-implementation
-
-{$R *.dfm}
-
-
-procedure TForm1.btnValidateClick(Sender: TObject);
-var
- LJO: TJsonObject;
-begin
- LJO := TJsonObject.ParseJSONValue(MemoJSON.Text) as TJsonObject;
-
- if not Assigned(LJO) then
- raise Exception.Create('JSON invlido!');
-
- try
- MemoResult.Text :=
-
- TDataValidator.JSON(LJO)
-
- .Validate('nome')
- .Value // Faz a validao somente dos valores dentro da Key nome
- .&Not.IsEmpty.WithMessage('NOME - No pode ser vazio')
- .IsAlpha().ToUpperCase
- .AddSchema(SchemaNome('Nome'))
- .RemoveAccents
- .&End
- .&End
-
- .Validate('base64')
- .Value // Faz a validao somente dos valores dentro da Key base64
- .&Not.IsEmpty.WithMessage('BASE64 - No pode ser vazio')
- .IsBase64.WithMessage('BASE64 - No um base 64')
- .ToBase64Decode.WithMessage('BASE64 - ToBase64Decode')
- .&End
- .&End
-
- .Validate('casa')
- .Key // Faz uma validao na key casa
- .IsOptional
- .&End
- .Value // Faz a validao no valor dentro da Key casa
- .&Not.IsEmpty.WithMessage('CASA - No pode ser vazio')
- .&End
- .&End
-
- .Validate('casa2')
- .Key
- .IsRequired.WithMessage(' necessrio a field casa2')
- .&End
- .&End
-
- .Validate('data_cadastro')
- .Key
- .IsRequired.WithMessage(' necessrio a field data_cadastro')
- .&End
- .Value
- .ToDate(False)
- .IsDate(False)
- .&End
- .&End
-
- .CheckAll
- .Informations.Message;
-
- MemoJSONResult.Text := LJO.ToString;
- finally
- LJO.DisposeOf;
- end;
-end;
-
-function TForm1.SchemaNome(const AField: string): IDataValidatorSchemaContext;
-begin
- Result :=
- TDataValidator.Schema
- .Validate
- .Trim
- .&Not.IsEmpty.WithMessage(Format('Preencha o campo %s !', [AField])) // No pode ser vazio
- .IsLength(0, 10).WithMessage(Format('O campo %s deve conter no mximo 10 caracteres!', [AField]))
- .IsAlpha(TDataValidatorLocaleLanguage.tl_pt_BR).WithMessage(Format('O campo %s possui caracteres invlidos!', [AField]))
- .&End;
-end;
-
-end.
diff --git a/samples/Model 5 - CMD/Model5.dpr b/samples/Model 5 - CMD/Model5.dpr
deleted file mode 100644
index af9bb59..0000000
--- a/samples/Model 5 - CMD/Model5.dpr
+++ /dev/null
@@ -1,67 +0,0 @@
-program Model5;
-
-{$APPTYPE CONSOLE}
-
-{$R *.res}
-
-
-uses
- DataValidator;
-
-function Valid(const AApelido: string; const AEmail: string): IDataValidatorResult;
-begin
- Result :=
-
- TDataValidator.Values
-
- .Validate(AApelido)
- .Trim
- .&Not.IsEmpty.WithMessage('Voc no informou o seu apelido!')
- .IsAlpha(TDataValidatorLocaleLanguage.tl_pt_BR).WithMessage('Seu apelido deve conter apenas letras!')
- .IsLength(1, 10).WithMessage('O apelido deve ter no mximo 10 caracteres!')
- .&End
-
- .Validate(AEmail)
- .Trim
- .&Not.IsEmpty.WithMessage('Voc no informou o seu e-mail!')
- .IsEmail.WithMessage('No um e-mail vlido!')
- .NormalizeEmail
- .&End
-
- .CheckAll;
-end;
-
-var
- LApelido: string;
- LEmail: string;
- LResult: IDataValidatorResult;
-
-begin
- repeat
- Writeln;
- Write(' Digite seu apelido: ');
- Readln(LApelido);
-
- Write(' Digite seu e-mail: ');
- Readln(LEmail);
-
- Writeln;
- LResult := Valid(LApelido, LEmail);
-
- if not LResult.OK then
- begin
- Writeln('-------------------------------------');
- Writeln;
- Write(LResult.Informations.Message);
- Writeln;
- Writeln(' Tente novamente!');
- Writeln;
- Writeln('-------------------------------------');
- end;
-
- until LResult.OK;
-
- Writeln('Parabns: tudo certo por aqui!');
-
- Readln;
-end.
diff --git a/samples/Model 5 - CMD/Model5.dproj b/samples/Model 5 - CMD/Model5.dproj
deleted file mode 100644
index c907aeb..0000000
--- a/samples/Model 5 - CMD/Model5.dproj
+++ /dev/null
@@ -1,1010 +0,0 @@
-
-
- {9734909C-12AF-4653-8514-20F9E7E2CC40}
- 19.2
- None
- True
- Debug
- Win32
- 1
- Console
- Model5.dpr
-
-
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Cfg_1
- true
- true
-
-
- true
- Base
- true
-
-
- .\$(Platform)\$(Config)
- .\$(Platform)\$(Config)
- false
- false
- false
- false
- false
- System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)
- Model5
-
-
- DBXSqliteDriver;RESTComponents;DBXInterBaseDriver;emsclientfiredac;tethering;DataSnapFireDAC;bindcompfmx;FmxTeeUI;fmx;FireDACIBDriver;FireDACDBXDriver;dbexpress;IndyCore;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;soapserver;bindengine;CloudService;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;FireDACSqliteDriver;ibmonitor;FMXTee;soaprtl;DbxCommonDriver;ibxpress;xmlrtl;soapmidas;DataSnapNativeClient;FireDACDSDriver;rtl;DbxClientDriver;ibxbindings;CustomIPTransport;bindcomp;IndyIPClient;dbxcds;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;$(DCC_UsePackage)
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_36x36.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_48x48.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_72x72.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_96x96.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_144x144.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_426x320.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_470x320.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_640x480.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_960x720.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_24x24.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_36x36.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_48x48.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_72x72.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_96x96.png
- android-support-v4.dex.jar;cloud-messaging.dex.jar;com-google-android-gms.play-services-ads-base.17.2.0.dex.jar;com-google-android-gms.play-services-ads-identifier.16.0.0.dex.jar;com-google-android-gms.play-services-ads-lite.17.2.0.dex.jar;com-google-android-gms.play-services-ads.17.2.0.dex.jar;com-google-android-gms.play-services-analytics-impl.16.0.8.dex.jar;com-google-android-gms.play-services-analytics.16.0.8.dex.jar;com-google-android-gms.play-services-base.16.0.1.dex.jar;com-google-android-gms.play-services-basement.16.2.0.dex.jar;com-google-android-gms.play-services-gass.17.2.0.dex.jar;com-google-android-gms.play-services-identity.16.0.0.dex.jar;com-google-android-gms.play-services-maps.16.1.0.dex.jar;com-google-android-gms.play-services-measurement-base.16.4.0.dex.jar;com-google-android-gms.play-services-measurement-sdk-api.16.4.0.dex.jar;com-google-android-gms.play-services-stats.16.0.1.dex.jar;com-google-android-gms.play-services-tagmanager-v4-impl.16.0.8.dex.jar;com-google-android-gms.play-services-tasks.16.0.1.dex.jar;com-google-android-gms.play-services-wallet.16.0.1.dex.jar;com-google-firebase.firebase-analytics.16.4.0.dex.jar;com-google-firebase.firebase-common.16.1.0.dex.jar;com-google-firebase.firebase-iid-interop.16.0.1.dex.jar;com-google-firebase.firebase-iid.17.1.1.dex.jar;com-google-firebase.firebase-measurement-connector.17.0.1.dex.jar;com-google-firebase.firebase-messaging.17.5.0.dex.jar;fmx.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar
-
-
- DBXSqliteDriver;RESTComponents;DBXInterBaseDriver;emsclientfiredac;tethering;DataSnapFireDAC;bindcompfmx;FmxTeeUI;fmx;FireDACIBDriver;FireDACDBXDriver;dbexpress;IndyCore;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;soapserver;bindengine;CloudService;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;FireDACSqliteDriver;ibmonitor;FMXTee;soaprtl;DbxCommonDriver;ibxpress;xmlrtl;soapmidas;DataSnapNativeClient;FireDACDSDriver;rtl;DbxClientDriver;ibxbindings;CustomIPTransport;bindcomp;IndyIPClient;dbxcds;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;$(DCC_UsePackage)
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_36x36.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_48x48.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_72x72.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_96x96.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_144x144.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_426x320.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_470x320.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_640x480.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_960x720.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_24x24.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_36x36.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_48x48.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_72x72.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_96x96.png
- android-support-v4.dex.jar;cloud-messaging.dex.jar;com-google-android-gms.play-services-ads-base.17.2.0.dex.jar;com-google-android-gms.play-services-ads-identifier.16.0.0.dex.jar;com-google-android-gms.play-services-ads-lite.17.2.0.dex.jar;com-google-android-gms.play-services-ads.17.2.0.dex.jar;com-google-android-gms.play-services-analytics-impl.16.0.8.dex.jar;com-google-android-gms.play-services-analytics.16.0.8.dex.jar;com-google-android-gms.play-services-base.16.0.1.dex.jar;com-google-android-gms.play-services-basement.16.2.0.dex.jar;com-google-android-gms.play-services-gass.17.2.0.dex.jar;com-google-android-gms.play-services-identity.16.0.0.dex.jar;com-google-android-gms.play-services-maps.16.1.0.dex.jar;com-google-android-gms.play-services-measurement-base.16.4.0.dex.jar;com-google-android-gms.play-services-measurement-sdk-api.16.4.0.dex.jar;com-google-android-gms.play-services-stats.16.0.1.dex.jar;com-google-android-gms.play-services-tagmanager-v4-impl.16.0.8.dex.jar;com-google-android-gms.play-services-tasks.16.0.1.dex.jar;com-google-android-gms.play-services-wallet.16.0.1.dex.jar;com-google-firebase.firebase-analytics.16.4.0.dex.jar;com-google-firebase.firebase-common.16.1.0.dex.jar;com-google-firebase.firebase-iid-interop.16.0.1.dex.jar;com-google-firebase.firebase-iid.17.1.1.dex.jar;com-google-firebase.firebase-measurement-connector.17.0.1.dex.jar;com-google-firebase.firebase-messaging.17.5.0.dex.jar;fmx.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar
-
-
- DBXSqliteDriver;RESTComponents;fmxase;DBXInterBaseDriver;emsclientfiredac;tethering;DataSnapFireDAC;bindcompfmx;FmxTeeUI;fmx;FireDACIBDriver;FireDACDBXDriver;dbexpress;IndyCore;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;soapserver;bindengine;CloudService;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;FireDACSqliteDriver;ibmonitor;FMXTee;soaprtl;DbxCommonDriver;ibxpress;xmlrtl;soapmidas;DataSnapNativeClient;FireDACDSDriver;rtl;DbxClientDriver;ibxbindings;CustomIPTransport;bindcomp;IndyIPClient;dbxcds;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;$(DCC_UsePackage)
-
-
- DBXSqliteDriver;RESTComponents;fmxase;DBXInterBaseDriver;emsclientfiredac;tethering;DataSnapFireDAC;bindcompfmx;FmxTeeUI;fmx;FireDACIBDriver;FireDACDBXDriver;dbexpress;IndyCore;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;soapserver;bindengine;CloudService;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;FireDACSqliteDriver;ibmonitor;FMXTee;soaprtl;DbxCommonDriver;ibxpress;xmlrtl;soapmidas;DataSnapNativeClient;FireDACDSDriver;rtl;DbxClientDriver;ibxbindings;CustomIPTransport;bindcomp;IndyIPClient;dbxcds;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;$(DCC_UsePackage)
-
-
- RESTComponents;emsclientfiredac;DataSnapFireDAC;FireDACADSDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;inetdb;emsedge;fmx;FireDACIBDriver;dbexpress;IndyCore;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;DataSnapConnectors;soapserver;bindengine;CloudService;FireDACOracleDriver;FireDACMySQLDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;IndySystem;FireDACDb2Driver;FireDACInfxDriver;FireDAC;emshosting;FireDACSqliteDriver;FireDACPgDriver;FireDACASADriver;FireDACTDataDriver;soaprtl;DbxCommonDriver;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;rtl;emsserverresource;DbxClientDriver;CustomIPTransport;bindcomp;dbxcds;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;dbrtl;IndyProtocols;FireDACMongoDBDriver;DataSnapServerMidas;$(DCC_UsePackage)
-
-
- DBXSqliteDriver;RESTComponents;fmxase;DBXInterBaseDriver;emsclientfiredac;tethering;DataSnapFireDAC;FireDACMSSQLDriver;bindcompfmx;DBXOracleDriver;inetdb;FmxTeeUI;fmx;FireDACIBDriver;fmxdae;FireDACDBXDriver;dbexpress;IndyCore;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;soapserver;bindengine;DBXMySQLDriver;CloudService;FireDACOracleDriver;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;ibxpress;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;FireDACDSDriver;rtl;DbxClientDriver;ibxbindings;DBXSybaseASADriver;CustomIPTransport;bindcomp;DBXInformixDriver;IndyIPClient;dbxcds;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;inetdbxpress;FireDACMongoDBDriver;DataSnapServerMidas;$(DCC_UsePackage)
- true
-
-
- DBXSqliteDriver;RESTComponents;fmxase;DBXDb2Driver;DBXInterBaseDriver;vclactnband;vclFireDAC;bindcompvclsmp;emsclientfiredac;tethering;svnui;DataSnapFireDAC;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;svn;DBXOracleDriver;inetdb;FmxTeeUI;emsedge;fmx;FireDACIBDriver;fmxdae;vcledge;vclib;FireDACDBXDriver;dbexpress;IndyCore;vclx;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;vclie;bindengine;DBXMySQLDriver;CloudService;FireDACOracleDriver;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;vcl;IndyIPServer;DBXSybaseASEDriver;IndySystem;FireDACDb2Driver;bindcompvclwinx;dsnapcon;madExcept_;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;madBasic_;TeeDB;FireDAC;emshosting;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;ibxpress;Tee;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;FireDACDSDriver;rtl;emsserverresource;DbxClientDriver;ibxbindings;DBXSybaseASADriver;madDisAsm_;CustomIPTransport;vcldsnap;bindcomp;appanalytics;DBXInformixDriver;IndyIPClient;bindcompvcl;TeeUI;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;inetdbxpress;FireDACMongoDBDriver;DataSnapServerMidas;$(DCC_UsePackage)
- Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
- Debug
- CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=
- 1033
- true
- $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png
- $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png
-
-
- DBXSqliteDriver;RESTComponents;fmxase;DBXDb2Driver;DBXInterBaseDriver;vclactnband;vclFireDAC;bindcompvclsmp;emsclientfiredac;tethering;DataSnapFireDAC;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;DBXOracleDriver;inetdb;FmxTeeUI;emsedge;fmx;FireDACIBDriver;fmxdae;vcledge;vclib;FireDACDBXDriver;dbexpress;IndyCore;vclx;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;vclie;bindengine;DBXMySQLDriver;CloudService;FireDACOracleDriver;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;vcl;IndyIPServer;DBXSybaseASEDriver;IndySystem;FireDACDb2Driver;bindcompvclwinx;dsnapcon;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;TeeDB;FireDAC;emshosting;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;ibxpress;Tee;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;FireDACDSDriver;rtl;emsserverresource;DbxClientDriver;ibxbindings;DBXSybaseASADriver;CustomIPTransport;vcldsnap;bindcomp;appanalytics;DBXInformixDriver;IndyIPClient;bindcompvcl;TeeUI;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;inetdbxpress;FireDACMongoDBDriver;DataSnapServerMidas;$(DCC_UsePackage)
- true
- $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png
- $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png
-
-
- DEBUG;$(DCC_Define)
- true
- false
- true
- true
- true
-
-
- false
- ..\..\src\core;..\..\src\sanitializators;..\..\src\validators;$(DCC_UnitSearchPath)
- 1033
- (None)
-
-
- false
- RELEASE;$(DCC_Define)
- 0
- 0
-
-
-
- MainSource
-
-
- Cfg_2
- Base
-
-
- Base
-
-
- Cfg_1
- Base
-
-
-
- Delphi.Personality.12
- Application
-
-
-
- Model5.dpr
-
-
- Embarcadero C++Builder Office 2000 Servers Package
- Embarcadero C++Builder Office XP Servers Package
- Microsoft Office 2000 Sample Automation Server Wrapper Components
- Microsoft Office XP Sample Automation Server Wrapper Components
-
-
-
-
-
- true
-
-
-
-
- true
-
-
-
-
- true
-
-
-
-
- Model5.exe
- true
-
-
-
-
- 1
-
-
- Contents\MacOS
- 1
-
-
- 0
-
-
-
-
- classes
- 1
-
-
- classes
- 1
-
-
-
-
- res\xml
- 1
-
-
- res\xml
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
-
-
- library\lib\armeabi
- 1
-
-
- library\lib\armeabi
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
-
-
- library\lib\mips
- 1
-
-
- library\lib\mips
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
- library\lib\arm64-v8a
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
-
-
- res\drawable
- 1
-
-
- res\drawable
- 1
-
-
-
-
- res\values
- 1
-
-
- res\values
- 1
-
-
-
-
- res\values-v21
- 1
-
-
- res\values-v21
- 1
-
-
-
-
- res\values
- 1
-
-
- res\values
- 1
-
-
-
-
- res\drawable
- 1
-
-
- res\drawable
- 1
-
-
-
-
- res\drawable-xxhdpi
- 1
-
-
- res\drawable-xxhdpi
- 1
-
-
-
-
- res\drawable-xxxhdpi
- 1
-
-
- res\drawable-xxxhdpi
- 1
-
-
-
-
- res\drawable-ldpi
- 1
-
-
- res\drawable-ldpi
- 1
-
-
-
-
- res\drawable-mdpi
- 1
-
-
- res\drawable-mdpi
- 1
-
-
-
-
- res\drawable-hdpi
- 1
-
-
- res\drawable-hdpi
- 1
-
-
-
-
- res\drawable-xhdpi
- 1
-
-
- res\drawable-xhdpi
- 1
-
-
-
-
- res\drawable-mdpi
- 1
-
-
- res\drawable-mdpi
- 1
-
-
-
-
- res\drawable-hdpi
- 1
-
-
- res\drawable-hdpi
- 1
-
-
-
-
- res\drawable-xhdpi
- 1
-
-
- res\drawable-xhdpi
- 1
-
-
-
-
- res\drawable-xxhdpi
- 1
-
-
- res\drawable-xxhdpi
- 1
-
-
-
-
- res\drawable-xxxhdpi
- 1
-
-
- res\drawable-xxxhdpi
- 1
-
-
-
-
- res\drawable-small
- 1
-
-
- res\drawable-small
- 1
-
-
-
-
- res\drawable-normal
- 1
-
-
- res\drawable-normal
- 1
-
-
-
-
- res\drawable-large
- 1
-
-
- res\drawable-large
- 1
-
-
-
-
- res\drawable-xlarge
- 1
-
-
- res\drawable-xlarge
- 1
-
-
-
-
- res\values
- 1
-
-
- res\values
- 1
-
-
-
-
- 1
-
-
- Contents\MacOS
- 1
-
-
- 0
-
-
-
-
- Contents\MacOS
- 1
- .framework
-
-
- Contents\MacOS
- 1
- .framework
-
-
- 0
-
-
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- Contents\MacOS
- 1
- .dylib
-
-
- Contents\MacOS
- 1
- .dylib
-
-
- 0
- .dll;.bpl
-
-
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- Contents\MacOS
- 1
- .dylib
-
-
- Contents\MacOS
- 1
- .dylib
-
-
- 0
- .bpl
-
-
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- Contents\Resources\StartUp\
- 0
-
-
- Contents\Resources\StartUp\
- 0
-
-
- 0
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- 1
-
-
- 1
-
-
-
-
- ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
- 1
-
-
- ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
- 1
-
-
-
-
- ..\
- 1
-
-
- ..\
- 1
-
-
-
-
- 1
-
-
- 1
-
-
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen
- 64
-
-
- ..\$(PROJECTNAME).launchscreen
- 64
-
-
-
-
- 1
-
-
- 1
-
-
- 1
-
-
-
-
- ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
- 1
-
-
-
-
- ..\
- 1
-
-
- ..\
- 1
-
-
-
-
- Contents
- 1
-
-
- Contents
- 1
-
-
-
-
- Contents\Resources
- 1
-
-
- Contents\Resources
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
- library\lib\arm64-v8a
- 1
-
-
- 1
-
-
- 1
-
-
- 1
-
-
- 1
-
-
- Contents\MacOS
- 1
-
-
- Contents\MacOS
- 1
-
-
- 0
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
-
-
- 1
-
-
- 1
-
-
-
-
- Assets
- 1
-
-
- Assets
- 1
-
-
-
-
- Assets
- 1
-
-
- Assets
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- False
- False
- False
- False
- False
- False
- True
- False
-
-
- 12
-
-
-
-
-
diff --git a/samples/Model 6 - CMD JSON/Model6.dpr b/samples/Model 6 - CMD JSON/Model6.dpr
deleted file mode 100644
index f3b02a9..0000000
--- a/samples/Model 6 - CMD JSON/Model6.dpr
+++ /dev/null
@@ -1,87 +0,0 @@
-program Model6;
-
-{$APPTYPE CONSOLE}
-
-{$R *.res}
-
-
-uses
- DataValidator, System.JSON;
-
-function Valid(const AJO: TJSONObject): IDataValidatorResult;
-begin
- Result :=
-
- TDataValidator.JSON(AJO)
-
- .Validate('apelido')
- .Value
- .Trim
- .&Not.IsEmpty.WithMessage('Voc no informou o seu apelido!')
- .IsAlpha(TDataValidatorLocaleLanguage.tl_pt_BR).WithMessage('Seu apelido deve conter apenas letras!')
- .IsLength(1, 10).WithMessage('O apelido deve ter no mximo 10 caracteres!')
- .&End
- .&End
-
- .Validate('email')
- .Value
- .Trim
- .&Not.IsEmpty.WithMessage('Voc no informou o seu e-mail!')
- .IsEmail.WithMessage('No um e-mail vlido!')
- .NormalizeEmail
- .&End
- .&End
-
- .Validate('login')
- .Key
- .IsRequired.WithMessage(' obrigatrio ter a Key "login" no JSON.') // Obriga
- .&End
-
- .Value
- .Trim
- .&Not.IsEmpty.WithMessage('Voc no informou o login!')
- .IsAlpha(TDataValidatorLocaleLanguage.tl_pt_BR).WithMessage('Seu login deve conter apenas letras!')
- .IsLength(1, 10).WithMessage('O login deve ter no mximo 10 caracteres!')
- .&End
- .&End
-
- .Validate('nome')
- .Key
- .IsOptional // opcional - se existir a Key "nome" ele faz a validao
- .&End
-
- .Value
- .Trim
- .&Not.IsEmpty.WithMessage('Voc no informou o nome!')
- .IsAlpha(TDataValidatorLocaleLanguage.tl_pt_BR).WithMessage('Seu nome deve conter apenas letras!')
- .IsLength(1, 10).WithMessage('O nome deve ter no mximo 10 caracteres!')
- .&End
- .&End
-
- .CheckAll;
-end;
-
-var
- LJO: TJSONObject;
- LResult: IDataValidatorResult;
-begin
- LJO := TJSONObject.ParseJSONValue('{"apelido":"DLIO", "email":"developer.dlio@gmail.com"}') as TJSONObject;
-
- Writeln;
- LResult := Valid(LJO);
-
- if not LResult.OK then
- begin
- Writeln('-------------------------------------');
- Writeln;
- Write(LResult.Informations.Message);
- Writeln;
- Write(LResult.Informations.GetItem(0).Message);
- Writeln;
- Writeln(' Tente novamente!');
- Writeln;
- Writeln('-------------------------------------');
- end;
-
- Readln;
-end.
diff --git a/samples/Model 6 - CMD JSON/Model6.dproj b/samples/Model 6 - CMD JSON/Model6.dproj
deleted file mode 100644
index 9012f45..0000000
--- a/samples/Model 6 - CMD JSON/Model6.dproj
+++ /dev/null
@@ -1,1010 +0,0 @@
-
-
- {C908B735-7FAB-4790-8D13-FFA832D0D9C5}
- 19.2
- None
- True
- Debug
- Win32
- 1
- Console
- Model6.dpr
-
-
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Cfg_1
- true
- true
-
-
- true
- Base
- true
-
-
- .\$(Platform)\$(Config)
- .\$(Platform)\$(Config)
- false
- false
- false
- false
- false
- System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)
- Model6
-
-
- DBXSqliteDriver;RESTComponents;DBXInterBaseDriver;emsclientfiredac;tethering;DataSnapFireDAC;bindcompfmx;FmxTeeUI;fmx;FireDACIBDriver;FireDACDBXDriver;dbexpress;IndyCore;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;soapserver;bindengine;CloudService;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;FireDACSqliteDriver;ibmonitor;FMXTee;soaprtl;DbxCommonDriver;ibxpress;xmlrtl;soapmidas;DataSnapNativeClient;FireDACDSDriver;rtl;DbxClientDriver;ibxbindings;CustomIPTransport;bindcomp;IndyIPClient;dbxcds;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;$(DCC_UsePackage)
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_36x36.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_48x48.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_72x72.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_96x96.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_144x144.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_426x320.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_470x320.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_640x480.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_960x720.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_24x24.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_36x36.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_48x48.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_72x72.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_96x96.png
- android-support-v4.dex.jar;cloud-messaging.dex.jar;com-google-android-gms.play-services-ads-base.17.2.0.dex.jar;com-google-android-gms.play-services-ads-identifier.16.0.0.dex.jar;com-google-android-gms.play-services-ads-lite.17.2.0.dex.jar;com-google-android-gms.play-services-ads.17.2.0.dex.jar;com-google-android-gms.play-services-analytics-impl.16.0.8.dex.jar;com-google-android-gms.play-services-analytics.16.0.8.dex.jar;com-google-android-gms.play-services-base.16.0.1.dex.jar;com-google-android-gms.play-services-basement.16.2.0.dex.jar;com-google-android-gms.play-services-gass.17.2.0.dex.jar;com-google-android-gms.play-services-identity.16.0.0.dex.jar;com-google-android-gms.play-services-maps.16.1.0.dex.jar;com-google-android-gms.play-services-measurement-base.16.4.0.dex.jar;com-google-android-gms.play-services-measurement-sdk-api.16.4.0.dex.jar;com-google-android-gms.play-services-stats.16.0.1.dex.jar;com-google-android-gms.play-services-tagmanager-v4-impl.16.0.8.dex.jar;com-google-android-gms.play-services-tasks.16.0.1.dex.jar;com-google-android-gms.play-services-wallet.16.0.1.dex.jar;com-google-firebase.firebase-analytics.16.4.0.dex.jar;com-google-firebase.firebase-common.16.1.0.dex.jar;com-google-firebase.firebase-iid-interop.16.0.1.dex.jar;com-google-firebase.firebase-iid.17.1.1.dex.jar;com-google-firebase.firebase-measurement-connector.17.0.1.dex.jar;com-google-firebase.firebase-messaging.17.5.0.dex.jar;fmx.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar
-
-
- DBXSqliteDriver;RESTComponents;DBXInterBaseDriver;emsclientfiredac;tethering;DataSnapFireDAC;bindcompfmx;FmxTeeUI;fmx;FireDACIBDriver;FireDACDBXDriver;dbexpress;IndyCore;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;soapserver;bindengine;CloudService;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;FireDACSqliteDriver;ibmonitor;FMXTee;soaprtl;DbxCommonDriver;ibxpress;xmlrtl;soapmidas;DataSnapNativeClient;FireDACDSDriver;rtl;DbxClientDriver;ibxbindings;CustomIPTransport;bindcomp;IndyIPClient;dbxcds;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;$(DCC_UsePackage)
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_36x36.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_48x48.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_72x72.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_96x96.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_144x144.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_426x320.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_470x320.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_640x480.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_960x720.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_24x24.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_36x36.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_48x48.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_72x72.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_96x96.png
- android-support-v4.dex.jar;cloud-messaging.dex.jar;com-google-android-gms.play-services-ads-base.17.2.0.dex.jar;com-google-android-gms.play-services-ads-identifier.16.0.0.dex.jar;com-google-android-gms.play-services-ads-lite.17.2.0.dex.jar;com-google-android-gms.play-services-ads.17.2.0.dex.jar;com-google-android-gms.play-services-analytics-impl.16.0.8.dex.jar;com-google-android-gms.play-services-analytics.16.0.8.dex.jar;com-google-android-gms.play-services-base.16.0.1.dex.jar;com-google-android-gms.play-services-basement.16.2.0.dex.jar;com-google-android-gms.play-services-gass.17.2.0.dex.jar;com-google-android-gms.play-services-identity.16.0.0.dex.jar;com-google-android-gms.play-services-maps.16.1.0.dex.jar;com-google-android-gms.play-services-measurement-base.16.4.0.dex.jar;com-google-android-gms.play-services-measurement-sdk-api.16.4.0.dex.jar;com-google-android-gms.play-services-stats.16.0.1.dex.jar;com-google-android-gms.play-services-tagmanager-v4-impl.16.0.8.dex.jar;com-google-android-gms.play-services-tasks.16.0.1.dex.jar;com-google-android-gms.play-services-wallet.16.0.1.dex.jar;com-google-firebase.firebase-analytics.16.4.0.dex.jar;com-google-firebase.firebase-common.16.1.0.dex.jar;com-google-firebase.firebase-iid-interop.16.0.1.dex.jar;com-google-firebase.firebase-iid.17.1.1.dex.jar;com-google-firebase.firebase-measurement-connector.17.0.1.dex.jar;com-google-firebase.firebase-messaging.17.5.0.dex.jar;fmx.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar
-
-
- DBXSqliteDriver;RESTComponents;fmxase;DBXInterBaseDriver;emsclientfiredac;tethering;DataSnapFireDAC;bindcompfmx;FmxTeeUI;fmx;FireDACIBDriver;FireDACDBXDriver;dbexpress;IndyCore;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;soapserver;bindengine;CloudService;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;FireDACSqliteDriver;ibmonitor;FMXTee;soaprtl;DbxCommonDriver;ibxpress;xmlrtl;soapmidas;DataSnapNativeClient;FireDACDSDriver;rtl;DbxClientDriver;ibxbindings;CustomIPTransport;bindcomp;IndyIPClient;dbxcds;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;$(DCC_UsePackage)
-
-
- DBXSqliteDriver;RESTComponents;fmxase;DBXInterBaseDriver;emsclientfiredac;tethering;DataSnapFireDAC;bindcompfmx;FmxTeeUI;fmx;FireDACIBDriver;FireDACDBXDriver;dbexpress;IndyCore;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;soapserver;bindengine;CloudService;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;FireDACSqliteDriver;ibmonitor;FMXTee;soaprtl;DbxCommonDriver;ibxpress;xmlrtl;soapmidas;DataSnapNativeClient;FireDACDSDriver;rtl;DbxClientDriver;ibxbindings;CustomIPTransport;bindcomp;IndyIPClient;dbxcds;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;$(DCC_UsePackage)
-
-
- RESTComponents;emsclientfiredac;DataSnapFireDAC;FireDACADSDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;inetdb;emsedge;fmx;FireDACIBDriver;dbexpress;IndyCore;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;DataSnapConnectors;soapserver;bindengine;CloudService;FireDACOracleDriver;FireDACMySQLDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;IndySystem;FireDACDb2Driver;FireDACInfxDriver;FireDAC;emshosting;FireDACSqliteDriver;FireDACPgDriver;FireDACASADriver;FireDACTDataDriver;soaprtl;DbxCommonDriver;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;rtl;emsserverresource;DbxClientDriver;CustomIPTransport;bindcomp;dbxcds;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;dbrtl;IndyProtocols;FireDACMongoDBDriver;DataSnapServerMidas;$(DCC_UsePackage)
-
-
- DBXSqliteDriver;RESTComponents;fmxase;DBXInterBaseDriver;emsclientfiredac;tethering;DataSnapFireDAC;FireDACMSSQLDriver;bindcompfmx;DBXOracleDriver;inetdb;FmxTeeUI;fmx;FireDACIBDriver;fmxdae;FireDACDBXDriver;dbexpress;IndyCore;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;soapserver;bindengine;DBXMySQLDriver;CloudService;FireDACOracleDriver;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;ibxpress;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;FireDACDSDriver;rtl;DbxClientDriver;ibxbindings;DBXSybaseASADriver;CustomIPTransport;bindcomp;DBXInformixDriver;IndyIPClient;dbxcds;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;inetdbxpress;FireDACMongoDBDriver;DataSnapServerMidas;$(DCC_UsePackage)
- true
-
-
- DBXSqliteDriver;RESTComponents;fmxase;DBXDb2Driver;DBXInterBaseDriver;vclactnband;vclFireDAC;bindcompvclsmp;emsclientfiredac;tethering;svnui;DataSnapFireDAC;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;svn;DBXOracleDriver;inetdb;FmxTeeUI;emsedge;fmx;FireDACIBDriver;fmxdae;vcledge;vclib;FireDACDBXDriver;dbexpress;IndyCore;vclx;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;vclie;bindengine;DBXMySQLDriver;CloudService;FireDACOracleDriver;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;vcl;IndyIPServer;DBXSybaseASEDriver;IndySystem;FireDACDb2Driver;bindcompvclwinx;dsnapcon;madExcept_;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;madBasic_;TeeDB;FireDAC;emshosting;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;ibxpress;Tee;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;FireDACDSDriver;rtl;emsserverresource;DbxClientDriver;ibxbindings;DBXSybaseASADriver;madDisAsm_;CustomIPTransport;vcldsnap;bindcomp;appanalytics;DBXInformixDriver;IndyIPClient;bindcompvcl;TeeUI;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;inetdbxpress;FireDACMongoDBDriver;DataSnapServerMidas;$(DCC_UsePackage)
- Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
- Debug
- CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=
- 1033
- true
- $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png
- $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png
-
-
- DBXSqliteDriver;RESTComponents;fmxase;DBXDb2Driver;DBXInterBaseDriver;vclactnband;vclFireDAC;bindcompvclsmp;emsclientfiredac;tethering;DataSnapFireDAC;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;DBXOracleDriver;inetdb;FmxTeeUI;emsedge;fmx;FireDACIBDriver;fmxdae;vcledge;vclib;FireDACDBXDriver;dbexpress;IndyCore;vclx;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;vclie;bindengine;DBXMySQLDriver;CloudService;FireDACOracleDriver;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;vcl;IndyIPServer;DBXSybaseASEDriver;IndySystem;FireDACDb2Driver;bindcompvclwinx;dsnapcon;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;TeeDB;FireDAC;emshosting;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;ibxpress;Tee;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;FireDACDSDriver;rtl;emsserverresource;DbxClientDriver;ibxbindings;DBXSybaseASADriver;CustomIPTransport;vcldsnap;bindcomp;appanalytics;DBXInformixDriver;IndyIPClient;bindcompvcl;TeeUI;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;inetdbxpress;FireDACMongoDBDriver;DataSnapServerMidas;$(DCC_UsePackage)
- true
- $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png
- $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png
-
-
- DEBUG;$(DCC_Define)
- true
- false
- true
- true
- true
-
-
- false
- ../../src/core;../../src/sanitializators;../../src/validators;$(DCC_UnitSearchPath)
- 1033
- (None)
-
-
- false
- RELEASE;$(DCC_Define)
- 0
- 0
-
-
-
- MainSource
-
-
- Cfg_2
- Base
-
-
- Base
-
-
- Cfg_1
- Base
-
-
-
- Delphi.Personality.12
- Application
-
-
-
- Model6.dpr
-
-
- Embarcadero C++Builder Office 2000 Servers Package
- Embarcadero C++Builder Office XP Servers Package
- Microsoft Office 2000 Sample Automation Server Wrapper Components
- Microsoft Office XP Sample Automation Server Wrapper Components
-
-
-
-
-
- true
-
-
-
-
- true
-
-
-
-
- true
-
-
-
-
- Model6.exe
- true
-
-
-
-
- 1
-
-
- Contents\MacOS
- 1
-
-
- 0
-
-
-
-
- classes
- 1
-
-
- classes
- 1
-
-
-
-
- res\xml
- 1
-
-
- res\xml
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
-
-
- library\lib\armeabi
- 1
-
-
- library\lib\armeabi
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
-
-
- library\lib\mips
- 1
-
-
- library\lib\mips
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
- library\lib\arm64-v8a
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
-
-
- res\drawable
- 1
-
-
- res\drawable
- 1
-
-
-
-
- res\values
- 1
-
-
- res\values
- 1
-
-
-
-
- res\values-v21
- 1
-
-
- res\values-v21
- 1
-
-
-
-
- res\values
- 1
-
-
- res\values
- 1
-
-
-
-
- res\drawable
- 1
-
-
- res\drawable
- 1
-
-
-
-
- res\drawable-xxhdpi
- 1
-
-
- res\drawable-xxhdpi
- 1
-
-
-
-
- res\drawable-xxxhdpi
- 1
-
-
- res\drawable-xxxhdpi
- 1
-
-
-
-
- res\drawable-ldpi
- 1
-
-
- res\drawable-ldpi
- 1
-
-
-
-
- res\drawable-mdpi
- 1
-
-
- res\drawable-mdpi
- 1
-
-
-
-
- res\drawable-hdpi
- 1
-
-
- res\drawable-hdpi
- 1
-
-
-
-
- res\drawable-xhdpi
- 1
-
-
- res\drawable-xhdpi
- 1
-
-
-
-
- res\drawable-mdpi
- 1
-
-
- res\drawable-mdpi
- 1
-
-
-
-
- res\drawable-hdpi
- 1
-
-
- res\drawable-hdpi
- 1
-
-
-
-
- res\drawable-xhdpi
- 1
-
-
- res\drawable-xhdpi
- 1
-
-
-
-
- res\drawable-xxhdpi
- 1
-
-
- res\drawable-xxhdpi
- 1
-
-
-
-
- res\drawable-xxxhdpi
- 1
-
-
- res\drawable-xxxhdpi
- 1
-
-
-
-
- res\drawable-small
- 1
-
-
- res\drawable-small
- 1
-
-
-
-
- res\drawable-normal
- 1
-
-
- res\drawable-normal
- 1
-
-
-
-
- res\drawable-large
- 1
-
-
- res\drawable-large
- 1
-
-
-
-
- res\drawable-xlarge
- 1
-
-
- res\drawable-xlarge
- 1
-
-
-
-
- res\values
- 1
-
-
- res\values
- 1
-
-
-
-
- 1
-
-
- Contents\MacOS
- 1
-
-
- 0
-
-
-
-
- Contents\MacOS
- 1
- .framework
-
-
- Contents\MacOS
- 1
- .framework
-
-
- 0
-
-
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- Contents\MacOS
- 1
- .dylib
-
-
- Contents\MacOS
- 1
- .dylib
-
-
- 0
- .dll;.bpl
-
-
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- Contents\MacOS
- 1
- .dylib
-
-
- Contents\MacOS
- 1
- .dylib
-
-
- 0
- .bpl
-
-
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- Contents\Resources\StartUp\
- 0
-
-
- Contents\Resources\StartUp\
- 0
-
-
- 0
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- 1
-
-
- 1
-
-
-
-
- ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
- 1
-
-
- ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
- 1
-
-
-
-
- ..\
- 1
-
-
- ..\
- 1
-
-
-
-
- 1
-
-
- 1
-
-
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen
- 64
-
-
- ..\$(PROJECTNAME).launchscreen
- 64
-
-
-
-
- 1
-
-
- 1
-
-
- 1
-
-
-
-
- ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
- 1
-
-
-
-
- ..\
- 1
-
-
- ..\
- 1
-
-
-
-
- Contents
- 1
-
-
- Contents
- 1
-
-
-
-
- Contents\Resources
- 1
-
-
- Contents\Resources
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
- library\lib\arm64-v8a
- 1
-
-
- 1
-
-
- 1
-
-
- 1
-
-
- 1
-
-
- Contents\MacOS
- 1
-
-
- Contents\MacOS
- 1
-
-
- 0
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
-
-
- 1
-
-
- 1
-
-
-
-
- Assets
- 1
-
-
- Assets
- 1
-
-
-
-
- Assets
- 1
-
-
- Assets
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- False
- False
- False
- False
- False
- False
- True
- False
-
-
- 12
-
-
-
-
-
diff --git a/samples/Model 7 - CMD Schema/Model7.dpr b/samples/Model 7 - CMD Schema/Model7.dpr
deleted file mode 100644
index 28d4710..0000000
--- a/samples/Model 7 - CMD Schema/Model7.dpr
+++ /dev/null
@@ -1,102 +0,0 @@
-program Model7;
-
-{$APPTYPE CONSOLE}
-
-{$R *.res}
-
-uses
- DataValidator,
- System.SysUtils;
-
-function SchemaNome(const AField: string): IDataValidatorSchemaContext;
-begin
- Result :=
- TDataValidator.Schema
- .Validate
- .Trim
- .&Not.IsEmpty.WithMessage('Preencha o campo %s !', [AField]) // No pode ser vazio
- .IsLength(2, 10).WithMessage('O campo %s deve conter entre 2 a 10 caracteres!', [AField])
- .IsAlpha(TDataValidatorLocaleLanguage.tl_pt_BR).WithMessage('O campo %s possui caracteres invlidos!', [AField])
- .&End;
-end;
-
-function SchemaEmail(const AField: string): IDataValidatorSchemaContext;
-begin
- Result :=
- TDataValidator.Schema
- .Validate
- .Trim
- .&Not.IsEmpty.WithMessage('O %s no pode ser vazio!',[AField])
- .IsLength(2, 999).WithMessage('O campo %s deve ter mais de 6 caracteres!', [AField])
- .IsEmail.WithMessage('No um %s vlido!',[AField])
- .NormalizeEmail
- .&End;
-end;
-
-function Valid(const ANome: string; const AApelido: string; const AEmail: string; const AEmailConfirmacao: string): IDataValidatorResult;
-begin
- Result :=
-
- TDataValidator.Values
-
- .Validate(ANome)
- .AddSchema(SchemaNome('Nome'))
- .&End
-
- .Validate(AApelido)
- .AddSchema(SchemaNome('Apelido'))
- .&End
-
- .Validate(AEmail)
- .AddSchema(SchemaEmail('E-mail'))
- .&End
-
- .Validate(AEmailConfirmacao)
- .AddSchema(SchemaEmail('E-mail de confirmao'))
- .&End
-
- .CheckAll;
-end;
-
-var
- LNome: string;
- LApelido: string;
- LEmail: string;
- LEmailConfirmacao: string;
- LResult: IDataValidatorResult;
-
-begin
- repeat
- Writeln;
- Write(' Digite seu nome: ');
- Readln(LNome);
-
- Write(' Digite seu apelido: ');
- Readln(LApelido);
-
- Write(' Digite seu e-mail: ');
- Readln(LEmail);
-
- Write(' Confirme seu e-mail: ');
- Readln(LEmailConfirmacao);
-
- Writeln;
- LResult := Valid(LNome, LApelido, LEmail, LEmailConfirmacao);
-
- if not LResult.OK then
- begin
- Writeln('-------------------------------------');
- Writeln;
- Write(LResult.Informations.Message);
- Writeln;
- Writeln(' Tente novamente!');
- Writeln;
- Writeln('-------------------------------------');
- end;
-
- until LResult.OK;
-
- Writeln('Parabns: tudo certo por aqui!');
-
- Readln;
-end.
diff --git a/samples/Model 7 - CMD Schema/Model7.dproj b/samples/Model 7 - CMD Schema/Model7.dproj
deleted file mode 100644
index 8645989..0000000
--- a/samples/Model 7 - CMD Schema/Model7.dproj
+++ /dev/null
@@ -1,1010 +0,0 @@
-
-
- {3CD5FD4C-28EA-472F-BDFA-2F492CCDE60B}
- 19.2
- None
- True
- Debug
- Win32
- 1
- Console
- Model7.dpr
-
-
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Cfg_1
- true
- true
-
-
- true
- Base
- true
-
-
- .\$(Platform)\$(Config)
- .\$(Platform)\$(Config)
- false
- false
- false
- false
- false
- System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)
- Model7
-
-
- DBXSqliteDriver;RESTComponents;DBXInterBaseDriver;emsclientfiredac;tethering;DataSnapFireDAC;bindcompfmx;FmxTeeUI;fmx;FireDACIBDriver;FireDACDBXDriver;dbexpress;IndyCore;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;soapserver;bindengine;CloudService;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;FireDACSqliteDriver;ibmonitor;FMXTee;soaprtl;DbxCommonDriver;ibxpress;xmlrtl;soapmidas;DataSnapNativeClient;FireDACDSDriver;rtl;DbxClientDriver;ibxbindings;CustomIPTransport;bindcomp;IndyIPClient;dbxcds;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;$(DCC_UsePackage)
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_36x36.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_48x48.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_72x72.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_96x96.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_144x144.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_426x320.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_470x320.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_640x480.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_960x720.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_24x24.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_36x36.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_48x48.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_72x72.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_96x96.png
- android-support-v4.dex.jar;cloud-messaging.dex.jar;com-google-android-gms.play-services-ads-base.17.2.0.dex.jar;com-google-android-gms.play-services-ads-identifier.16.0.0.dex.jar;com-google-android-gms.play-services-ads-lite.17.2.0.dex.jar;com-google-android-gms.play-services-ads.17.2.0.dex.jar;com-google-android-gms.play-services-analytics-impl.16.0.8.dex.jar;com-google-android-gms.play-services-analytics.16.0.8.dex.jar;com-google-android-gms.play-services-base.16.0.1.dex.jar;com-google-android-gms.play-services-basement.16.2.0.dex.jar;com-google-android-gms.play-services-gass.17.2.0.dex.jar;com-google-android-gms.play-services-identity.16.0.0.dex.jar;com-google-android-gms.play-services-maps.16.1.0.dex.jar;com-google-android-gms.play-services-measurement-base.16.4.0.dex.jar;com-google-android-gms.play-services-measurement-sdk-api.16.4.0.dex.jar;com-google-android-gms.play-services-stats.16.0.1.dex.jar;com-google-android-gms.play-services-tagmanager-v4-impl.16.0.8.dex.jar;com-google-android-gms.play-services-tasks.16.0.1.dex.jar;com-google-android-gms.play-services-wallet.16.0.1.dex.jar;com-google-firebase.firebase-analytics.16.4.0.dex.jar;com-google-firebase.firebase-common.16.1.0.dex.jar;com-google-firebase.firebase-iid-interop.16.0.1.dex.jar;com-google-firebase.firebase-iid.17.1.1.dex.jar;com-google-firebase.firebase-measurement-connector.17.0.1.dex.jar;com-google-firebase.firebase-messaging.17.5.0.dex.jar;fmx.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar
-
-
- DBXSqliteDriver;RESTComponents;DBXInterBaseDriver;emsclientfiredac;tethering;DataSnapFireDAC;bindcompfmx;FmxTeeUI;fmx;FireDACIBDriver;FireDACDBXDriver;dbexpress;IndyCore;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;soapserver;bindengine;CloudService;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;FireDACSqliteDriver;ibmonitor;FMXTee;soaprtl;DbxCommonDriver;ibxpress;xmlrtl;soapmidas;DataSnapNativeClient;FireDACDSDriver;rtl;DbxClientDriver;ibxbindings;CustomIPTransport;bindcomp;IndyIPClient;dbxcds;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;$(DCC_UsePackage)
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_36x36.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_48x48.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_72x72.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_96x96.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_144x144.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_426x320.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_470x320.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_640x480.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_960x720.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_24x24.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_36x36.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_48x48.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_72x72.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_96x96.png
- android-support-v4.dex.jar;cloud-messaging.dex.jar;com-google-android-gms.play-services-ads-base.17.2.0.dex.jar;com-google-android-gms.play-services-ads-identifier.16.0.0.dex.jar;com-google-android-gms.play-services-ads-lite.17.2.0.dex.jar;com-google-android-gms.play-services-ads.17.2.0.dex.jar;com-google-android-gms.play-services-analytics-impl.16.0.8.dex.jar;com-google-android-gms.play-services-analytics.16.0.8.dex.jar;com-google-android-gms.play-services-base.16.0.1.dex.jar;com-google-android-gms.play-services-basement.16.2.0.dex.jar;com-google-android-gms.play-services-gass.17.2.0.dex.jar;com-google-android-gms.play-services-identity.16.0.0.dex.jar;com-google-android-gms.play-services-maps.16.1.0.dex.jar;com-google-android-gms.play-services-measurement-base.16.4.0.dex.jar;com-google-android-gms.play-services-measurement-sdk-api.16.4.0.dex.jar;com-google-android-gms.play-services-stats.16.0.1.dex.jar;com-google-android-gms.play-services-tagmanager-v4-impl.16.0.8.dex.jar;com-google-android-gms.play-services-tasks.16.0.1.dex.jar;com-google-android-gms.play-services-wallet.16.0.1.dex.jar;com-google-firebase.firebase-analytics.16.4.0.dex.jar;com-google-firebase.firebase-common.16.1.0.dex.jar;com-google-firebase.firebase-iid-interop.16.0.1.dex.jar;com-google-firebase.firebase-iid.17.1.1.dex.jar;com-google-firebase.firebase-measurement-connector.17.0.1.dex.jar;com-google-firebase.firebase-messaging.17.5.0.dex.jar;fmx.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar
-
-
- DBXSqliteDriver;RESTComponents;fmxase;DBXInterBaseDriver;emsclientfiredac;tethering;DataSnapFireDAC;bindcompfmx;FmxTeeUI;fmx;FireDACIBDriver;FireDACDBXDriver;dbexpress;IndyCore;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;soapserver;bindengine;CloudService;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;FireDACSqliteDriver;ibmonitor;FMXTee;soaprtl;DbxCommonDriver;ibxpress;xmlrtl;soapmidas;DataSnapNativeClient;FireDACDSDriver;rtl;DbxClientDriver;ibxbindings;CustomIPTransport;bindcomp;IndyIPClient;dbxcds;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;$(DCC_UsePackage)
-
-
- DBXSqliteDriver;RESTComponents;fmxase;DBXInterBaseDriver;emsclientfiredac;tethering;DataSnapFireDAC;bindcompfmx;FmxTeeUI;fmx;FireDACIBDriver;FireDACDBXDriver;dbexpress;IndyCore;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;soapserver;bindengine;CloudService;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;FireDACSqliteDriver;ibmonitor;FMXTee;soaprtl;DbxCommonDriver;ibxpress;xmlrtl;soapmidas;DataSnapNativeClient;FireDACDSDriver;rtl;DbxClientDriver;ibxbindings;CustomIPTransport;bindcomp;IndyIPClient;dbxcds;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;$(DCC_UsePackage)
-
-
- RESTComponents;emsclientfiredac;DataSnapFireDAC;FireDACADSDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;inetdb;emsedge;fmx;FireDACIBDriver;dbexpress;IndyCore;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;DataSnapConnectors;soapserver;bindengine;CloudService;FireDACOracleDriver;FireDACMySQLDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;IndySystem;FireDACDb2Driver;FireDACInfxDriver;FireDAC;emshosting;FireDACSqliteDriver;FireDACPgDriver;FireDACASADriver;FireDACTDataDriver;soaprtl;DbxCommonDriver;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;rtl;emsserverresource;DbxClientDriver;CustomIPTransport;bindcomp;dbxcds;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;dbrtl;IndyProtocols;FireDACMongoDBDriver;DataSnapServerMidas;$(DCC_UsePackage)
-
-
- DBXSqliteDriver;RESTComponents;fmxase;DBXInterBaseDriver;emsclientfiredac;tethering;DataSnapFireDAC;FireDACMSSQLDriver;bindcompfmx;DBXOracleDriver;inetdb;FmxTeeUI;fmx;FireDACIBDriver;fmxdae;FireDACDBXDriver;dbexpress;IndyCore;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;soapserver;bindengine;DBXMySQLDriver;CloudService;FireDACOracleDriver;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;ibxpress;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;FireDACDSDriver;rtl;DbxClientDriver;ibxbindings;DBXSybaseASADriver;CustomIPTransport;bindcomp;DBXInformixDriver;IndyIPClient;dbxcds;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;inetdbxpress;FireDACMongoDBDriver;DataSnapServerMidas;$(DCC_UsePackage)
- true
-
-
- DBXSqliteDriver;RESTComponents;fmxase;DBXDb2Driver;DBXInterBaseDriver;vclactnband;vclFireDAC;bindcompvclsmp;emsclientfiredac;tethering;svnui;DataSnapFireDAC;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;svn;DBXOracleDriver;inetdb;FmxTeeUI;emsedge;fmx;FireDACIBDriver;fmxdae;vcledge;vclib;FireDACDBXDriver;dbexpress;IndyCore;vclx;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;vclie;bindengine;DBXMySQLDriver;CloudService;FireDACOracleDriver;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;vcl;IndyIPServer;DBXSybaseASEDriver;IndySystem;FireDACDb2Driver;bindcompvclwinx;dsnapcon;madExcept_;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;madBasic_;TeeDB;FireDAC;emshosting;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;ibxpress;Tee;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;FireDACDSDriver;rtl;emsserverresource;DbxClientDriver;ibxbindings;DBXSybaseASADriver;madDisAsm_;CustomIPTransport;vcldsnap;bindcomp;appanalytics;DBXInformixDriver;IndyIPClient;bindcompvcl;TeeUI;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;inetdbxpress;FireDACMongoDBDriver;DataSnapServerMidas;$(DCC_UsePackage)
- Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
- Debug
- CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=
- 1033
- true
- $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png
- $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png
-
-
- DBXSqliteDriver;RESTComponents;fmxase;DBXDb2Driver;DBXInterBaseDriver;vclactnband;vclFireDAC;bindcompvclsmp;emsclientfiredac;tethering;DataSnapFireDAC;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;DBXOracleDriver;inetdb;FmxTeeUI;emsedge;fmx;FireDACIBDriver;fmxdae;vcledge;vclib;FireDACDBXDriver;dbexpress;IndyCore;vclx;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;vclie;bindengine;DBXMySQLDriver;CloudService;FireDACOracleDriver;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;vcl;IndyIPServer;DBXSybaseASEDriver;IndySystem;FireDACDb2Driver;bindcompvclwinx;dsnapcon;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;TeeDB;FireDAC;emshosting;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;ibxpress;Tee;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;FireDACDSDriver;rtl;emsserverresource;DbxClientDriver;ibxbindings;DBXSybaseASADriver;CustomIPTransport;vcldsnap;bindcomp;appanalytics;DBXInformixDriver;IndyIPClient;bindcompvcl;TeeUI;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;inetdbxpress;FireDACMongoDBDriver;DataSnapServerMidas;$(DCC_UsePackage)
- true
- $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png
- $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png
-
-
- DEBUG;$(DCC_Define)
- true
- false
- true
- true
- true
-
-
- false
- ..\..\src\core;..\..\src\sanitializators;..\..\src\validators;$(DCC_UnitSearchPath)
- 1033
- (None)
-
-
- false
- RELEASE;$(DCC_Define)
- 0
- 0
-
-
-
- MainSource
-
-
- Cfg_2
- Base
-
-
- Base
-
-
- Cfg_1
- Base
-
-
-
- Delphi.Personality.12
- Application
-
-
-
- Model7.dpr
-
-
- Embarcadero C++Builder Office 2000 Servers Package
- Embarcadero C++Builder Office XP Servers Package
- Microsoft Office 2000 Sample Automation Server Wrapper Components
- Microsoft Office XP Sample Automation Server Wrapper Components
-
-
-
-
-
- true
-
-
-
-
- true
-
-
-
-
- true
-
-
-
-
- Model7.exe
- true
-
-
-
-
- 1
-
-
- Contents\MacOS
- 1
-
-
- 0
-
-
-
-
- classes
- 1
-
-
- classes
- 1
-
-
-
-
- res\xml
- 1
-
-
- res\xml
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
-
-
- library\lib\armeabi
- 1
-
-
- library\lib\armeabi
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
-
-
- library\lib\mips
- 1
-
-
- library\lib\mips
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
- library\lib\arm64-v8a
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
-
-
- res\drawable
- 1
-
-
- res\drawable
- 1
-
-
-
-
- res\values
- 1
-
-
- res\values
- 1
-
-
-
-
- res\values-v21
- 1
-
-
- res\values-v21
- 1
-
-
-
-
- res\values
- 1
-
-
- res\values
- 1
-
-
-
-
- res\drawable
- 1
-
-
- res\drawable
- 1
-
-
-
-
- res\drawable-xxhdpi
- 1
-
-
- res\drawable-xxhdpi
- 1
-
-
-
-
- res\drawable-xxxhdpi
- 1
-
-
- res\drawable-xxxhdpi
- 1
-
-
-
-
- res\drawable-ldpi
- 1
-
-
- res\drawable-ldpi
- 1
-
-
-
-
- res\drawable-mdpi
- 1
-
-
- res\drawable-mdpi
- 1
-
-
-
-
- res\drawable-hdpi
- 1
-
-
- res\drawable-hdpi
- 1
-
-
-
-
- res\drawable-xhdpi
- 1
-
-
- res\drawable-xhdpi
- 1
-
-
-
-
- res\drawable-mdpi
- 1
-
-
- res\drawable-mdpi
- 1
-
-
-
-
- res\drawable-hdpi
- 1
-
-
- res\drawable-hdpi
- 1
-
-
-
-
- res\drawable-xhdpi
- 1
-
-
- res\drawable-xhdpi
- 1
-
-
-
-
- res\drawable-xxhdpi
- 1
-
-
- res\drawable-xxhdpi
- 1
-
-
-
-
- res\drawable-xxxhdpi
- 1
-
-
- res\drawable-xxxhdpi
- 1
-
-
-
-
- res\drawable-small
- 1
-
-
- res\drawable-small
- 1
-
-
-
-
- res\drawable-normal
- 1
-
-
- res\drawable-normal
- 1
-
-
-
-
- res\drawable-large
- 1
-
-
- res\drawable-large
- 1
-
-
-
-
- res\drawable-xlarge
- 1
-
-
- res\drawable-xlarge
- 1
-
-
-
-
- res\values
- 1
-
-
- res\values
- 1
-
-
-
-
- 1
-
-
- Contents\MacOS
- 1
-
-
- 0
-
-
-
-
- Contents\MacOS
- 1
- .framework
-
-
- Contents\MacOS
- 1
- .framework
-
-
- 0
-
-
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- Contents\MacOS
- 1
- .dylib
-
-
- Contents\MacOS
- 1
- .dylib
-
-
- 0
- .dll;.bpl
-
-
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- Contents\MacOS
- 1
- .dylib
-
-
- Contents\MacOS
- 1
- .dylib
-
-
- 0
- .bpl
-
-
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- Contents\Resources\StartUp\
- 0
-
-
- Contents\Resources\StartUp\
- 0
-
-
- 0
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- 1
-
-
- 1
-
-
-
-
- ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
- 1
-
-
- ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
- 1
-
-
-
-
- ..\
- 1
-
-
- ..\
- 1
-
-
-
-
- 1
-
-
- 1
-
-
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen
- 64
-
-
- ..\$(PROJECTNAME).launchscreen
- 64
-
-
-
-
- 1
-
-
- 1
-
-
- 1
-
-
-
-
- ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
- 1
-
-
-
-
- ..\
- 1
-
-
- ..\
- 1
-
-
-
-
- Contents
- 1
-
-
- Contents
- 1
-
-
-
-
- Contents\Resources
- 1
-
-
- Contents\Resources
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
- library\lib\arm64-v8a
- 1
-
-
- 1
-
-
- 1
-
-
- 1
-
-
- 1
-
-
- Contents\MacOS
- 1
-
-
- Contents\MacOS
- 1
-
-
- 0
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
-
-
- 1
-
-
- 1
-
-
-
-
- Assets
- 1
-
-
- Assets
- 1
-
-
-
-
- Assets
- 1
-
-
- Assets
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- False
- False
- False
- False
- False
- False
- True
- False
-
-
- 12
-
-
-
-
-
diff --git a/samples/Model 7 - CMD Schema/Model7.pas b/samples/Model 7 - CMD Schema/Model7.pas
deleted file mode 100644
index 19e37f8..0000000
--- a/samples/Model 7 - CMD Schema/Model7.pas
+++ /dev/null
@@ -1,100 +0,0 @@
-program Model7;
-
-{$APPTYPE CONSOLE}
-
-{$R *.res}
-
-uses
- DataValidator, System.SysUtils;
-
-function SchemaNome(const AField: string): IDataValidatorSchema;
-begin
- Result :=
- TDataValidator
- .Schema
- .Trim
- .&Not.IsEmpty.WithMessage('Preencha o campo %s !', [AField]) // No pode ser vazio
- .IsLength(0, 10).WithMessage('O campo %s deve conter no mximo 10 caracteres!', [AField])
- .IsAlpha(TDataValidatorLocaleLanguage.tl_pt_BR).WithMessage('O campo %s possui caracteres invlidos!', [AField])
- .&End;
-end;
-
-function SchemaEmail(const AField: string): IDataValidatorSchema;
-begin
- Result :=
- TDataValidator
- .Schema
- .Trim
- .&Not.IsEmpty.WithMessage('O %s no pode ser vazio!',[AField])
- .IsEmail.WithMessage('No um %s vlido!',[AField])
- .NormalizeEmail
- .&End;
-end;
-
-function Valid(const ANome: string; const AApelido: string; const AEmail: string; const AEmailConfirmacao: string): IDataValidatorResult;
-begin
- Result :=
-
- TDataValidator.Values
-
- .Validate(ANome)
- .AddSchema(SchemaNome('Nome'))
- .&End
-
- .Validate(AApelido)
- .AddSchema(SchemaNome('Apelido'))
- .&End
-
- .Validate(AEmail)
- .AddSchema(SchemaNome('E-mail'))
- .&End
-
- .Validate(AEmailConfirmacao)
- .AddSchema(SchemaNome('E-mail de confirmao'))
- .&End
-
- .CheckedAll;
-end;
-
-var
- LNome: string;
- LApelido: string;
- LEmail: string;
- LEmailConfirmacao: string;
- LResult: IDataValidatorResult;
-
-begin
- repeat
- Writeln;
- Write(' Digite seu nome: ');
- Readln(LNome);
-
- Write(' Digite seu apelido: ');
- Readln(LApelido);
-
- Write(' Digite seu e-mail: ');
- Readln(LEmail);
-
- Write(' Confirme seu e-mail: ');
- Readln(LEmailConfirmacao);
-
- Writeln;
- LResult := Valid(LNome, LApelido, LEmail, LEmailConfirmacao);
-
- if not LResult.OK then
- begin
- Writeln('-------------------------------------');
- Writeln;
- Write(LResult.Informations.Message);
- Writeln;
- Writeln(' Tente novamente!');
- Writeln;
- Writeln('-------------------------------------');
- end;
-
- until LResult.OK;
-
- Writeln('Parabns: tudo certo por aqui!');
-
- Readln;
-end.
diff --git a/samples/Model 8 - Horse/Model8.dpr b/samples/Model 8 - Horse/Model8.dpr
deleted file mode 100644
index 5e9c032..0000000
--- a/samples/Model 8 - Horse/Model8.dpr
+++ /dev/null
@@ -1,154 +0,0 @@
-program Model8;
-
-uses
- DataValidator,
- Horse, Horse.Jhonson, System.JSON, System.SysUtils, System.DateUtils;
-
-function ValidateRegister(const AJSON: TJSONObject): IDataValidatorResult;
-begin
- Result :=
- TDataValidator.JSON(AJSON)
- .Validate('nome')
- .Key
- .IsRequired.WithMessage('Key "nome" no informado!')
- .&End
-
- .Value
- .Trim
- .&Not.IsEmpty.WithMessage('O campo nome no foi preenchido!')
- .IsAlpha(TDataValidatorLocaleLanguage.tl_pt_BR).WithMessage('O campo nome no pode possuir caracters especiais!')
- .IsLength(3, 100).WithMessage('O campo nome deve ter no mnimo 3 caracters e no mzimo 100')
- .&End
- .&End
-
- .Validate('email')
- .Key
- .IsRequired.WithMessage('Key "email" no informado!')
- .&End
-
- .Value
- .Trim
- .&Not.IsEmpty.WithMessage('Informe o e-mail!')
- .IsLength(6, 100).WithMessage('Informe um e-mail maior que 5 caracteres!')
- .NormalizeEmail(True, False).IsEmail.WithMessage('E-mail invlido!')
- .CustomValue(
- function(const AValue: string): Boolean
- begin
- // Recebe o valor no AValue para analisar e fazer o que for necessrio
- //
- // Ex:
- // Consulta no banco verifica se esse email j existe;
- //
- // Result -> True = significa tudo certo! - False = significa que tem algum problema
-
- Result := AValue = 'developer.dlio@gmail.com';
-
- end).WithMessage('E-mail j cadastrado!')
- .&End
- .&End
-
- .Validate('data_nascimento')
- .Key
- .IsRequired.WithMessage('Key "data_nascimento" no informado!')
- .&End
-
- .Value
- .Trim
- .&Not.IsEmpty.WithMessage('Informe a data de nascimento!')
- .IsDate.WithMessage('Data de nascimento invlido!')
- .IsDateLessThan(Now).WithMessage('A data de nascimento no pode ser maior que a data atual!')
- .IsDateGreaterThan(IncYear(Now, -100)).WithMessage('A data de nascimento no pode ser menor que 100 anos atrs!')
- .&End
- .&End
-
- .Validate('telefone')
- .Key
- .IsRequired.WithMessage('Key "telefone" no informado!')
- .&End
-
- .Value
- .Trim
- .&Not.IsEmpty.WithMessage('Informe o telefone!')
- .IsPhoneNumber(TDataValidatorLocaleLanguage.tl_pt_BR).WithMessage('Nmero de telefone invlido!')
- .&End
- .&End
-
- .Validate('cpf')
- .Key
- .IsRequired.WithMessage('Key "cpf" no informado!')
- .&End
-
- .Value
- .Trim
- .&Not.IsEmpty.WithMessage('Informe o CPF!')
- .IsLength(14, 14).WithMessage('Informe corretamente todos os dgitos do CPF!')
- .OnlyNumbers.IsCPF.WithMessage('CPF invlido!')
- .&End
- .&End
-
- .CheckAll;
-end;
-
-begin
-
-// Router:
-// POST http://localhost:9000/register
-
-// Body
-// JSON Test
-{
- "nome":"Danilo Lucas",
- "email":"developer.dlio@gmail.com",
- "data_nascimento":"23/08/1994",
- "telefone":"48999999999",
- "cpf":"012.345.678-90"
-}
-
- THorse.Use(Jhonson());
-
- THorse.Post('/register',
- procedure(Req: THorseRequest; Res: THorseResponse; Next: TProc)
- var
- LBody: TJSONObject;
- LValidatorResult: IDataValidatorResult;
- LResponseError: TJsonObject;
- LResponseErrorCause: TJsonArray;
- I: Integer;
- begin
- try
- LBody := Req.Body;
- except
- LBody := nil;
- end;
-
- if not Assigned(LBody) then
- begin
- Res.Status(401).Send('No foi informado o JSON no body corretamente!');
- raise EHorseCallbackInterrupted.Create;
- end;
-
- // faz a validao completa
- LValidatorResult := ValidateRegister(LBody);
-
- // Se tive tudo ok, j faz o retorno
- if LValidatorResult.OK then
- begin
- Res.Status(201).Send('OK, registro feito com sucesso!');
- raise EHorseCallbackInterrupted.Create;
- end;
-
- // Faz a exibio da mensagem de erro!
- LResponseErrorCause := TJsonArray.Create;
- for I := 0 to Pred(LValidatorResult.Informations.Count) do
- LResponseErrorCause.Add(LValidatorResult.Informations.GetItem(I).Message);
-
- LResponseError := TJsonObject.Create;
- LResponseError.AddPair('error', TJSONBool.Create(True));
- LResponseError.AddPair('causes', LResponseErrorCause);
-
- Res.Send(LResponseError);
- end);
-
- THorse.Listen(9000);
-
-end.
diff --git a/samples/Model 8 - Horse/Model8.dproj b/samples/Model 8 - Horse/Model8.dproj
deleted file mode 100644
index 475eaea..0000000
--- a/samples/Model 8 - Horse/Model8.dproj
+++ /dev/null
@@ -1,1011 +0,0 @@
-
-
- {7EC5A48C-EC1D-43B5-A589-B7677C774BE0}
- 19.2
- None
- True
- Debug
- Win32
- 1
- Console
- Model8.dpr
-
-
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Cfg_1
- true
- true
-
-
- true
- Base
- true
-
-
- .\$(Platform)\$(Config)
- .\$(Platform)\$(Config)
- false
- false
- false
- false
- false
- System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)
- Model8
- modules\.dcp;modules\.dcu;modules;modules\horse\src;modules\jhonson\src;$(DCC_UnitSearchPath)
-
-
- DBXSqliteDriver;RESTComponents;DBXInterBaseDriver;emsclientfiredac;tethering;DataSnapFireDAC;bindcompfmx;FmxTeeUI;fmx;FireDACIBDriver;FireDACDBXDriver;dbexpress;IndyCore;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;soapserver;bindengine;CloudService;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;FireDACSqliteDriver;ibmonitor;FMXTee;soaprtl;DbxCommonDriver;ibxpress;xmlrtl;soapmidas;DataSnapNativeClient;FireDACDSDriver;rtl;DbxClientDriver;ibxbindings;CustomIPTransport;bindcomp;IndyIPClient;dbxcds;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;$(DCC_UsePackage)
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_36x36.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_48x48.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_72x72.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_96x96.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_144x144.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_426x320.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_470x320.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_640x480.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_960x720.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_24x24.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_36x36.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_48x48.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_72x72.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_96x96.png
- android-support-v4.dex.jar;cloud-messaging.dex.jar;com-google-android-gms.play-services-ads-base.17.2.0.dex.jar;com-google-android-gms.play-services-ads-identifier.16.0.0.dex.jar;com-google-android-gms.play-services-ads-lite.17.2.0.dex.jar;com-google-android-gms.play-services-ads.17.2.0.dex.jar;com-google-android-gms.play-services-analytics-impl.16.0.8.dex.jar;com-google-android-gms.play-services-analytics.16.0.8.dex.jar;com-google-android-gms.play-services-base.16.0.1.dex.jar;com-google-android-gms.play-services-basement.16.2.0.dex.jar;com-google-android-gms.play-services-gass.17.2.0.dex.jar;com-google-android-gms.play-services-identity.16.0.0.dex.jar;com-google-android-gms.play-services-maps.16.1.0.dex.jar;com-google-android-gms.play-services-measurement-base.16.4.0.dex.jar;com-google-android-gms.play-services-measurement-sdk-api.16.4.0.dex.jar;com-google-android-gms.play-services-stats.16.0.1.dex.jar;com-google-android-gms.play-services-tagmanager-v4-impl.16.0.8.dex.jar;com-google-android-gms.play-services-tasks.16.0.1.dex.jar;com-google-android-gms.play-services-wallet.16.0.1.dex.jar;com-google-firebase.firebase-analytics.16.4.0.dex.jar;com-google-firebase.firebase-common.16.1.0.dex.jar;com-google-firebase.firebase-iid-interop.16.0.1.dex.jar;com-google-firebase.firebase-iid.17.1.1.dex.jar;com-google-firebase.firebase-measurement-connector.17.0.1.dex.jar;com-google-firebase.firebase-messaging.17.5.0.dex.jar;fmx.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar
-
-
- DBXSqliteDriver;RESTComponents;DBXInterBaseDriver;emsclientfiredac;tethering;DataSnapFireDAC;bindcompfmx;FmxTeeUI;fmx;FireDACIBDriver;FireDACDBXDriver;dbexpress;IndyCore;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;soapserver;bindengine;CloudService;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;FireDACSqliteDriver;ibmonitor;FMXTee;soaprtl;DbxCommonDriver;ibxpress;xmlrtl;soapmidas;DataSnapNativeClient;FireDACDSDriver;rtl;DbxClientDriver;ibxbindings;CustomIPTransport;bindcomp;IndyIPClient;dbxcds;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;$(DCC_UsePackage)
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_36x36.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_48x48.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_72x72.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_96x96.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_144x144.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_426x320.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_470x320.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_640x480.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_960x720.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_24x24.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_36x36.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_48x48.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_72x72.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_96x96.png
- android-support-v4.dex.jar;cloud-messaging.dex.jar;com-google-android-gms.play-services-ads-base.17.2.0.dex.jar;com-google-android-gms.play-services-ads-identifier.16.0.0.dex.jar;com-google-android-gms.play-services-ads-lite.17.2.0.dex.jar;com-google-android-gms.play-services-ads.17.2.0.dex.jar;com-google-android-gms.play-services-analytics-impl.16.0.8.dex.jar;com-google-android-gms.play-services-analytics.16.0.8.dex.jar;com-google-android-gms.play-services-base.16.0.1.dex.jar;com-google-android-gms.play-services-basement.16.2.0.dex.jar;com-google-android-gms.play-services-gass.17.2.0.dex.jar;com-google-android-gms.play-services-identity.16.0.0.dex.jar;com-google-android-gms.play-services-maps.16.1.0.dex.jar;com-google-android-gms.play-services-measurement-base.16.4.0.dex.jar;com-google-android-gms.play-services-measurement-sdk-api.16.4.0.dex.jar;com-google-android-gms.play-services-stats.16.0.1.dex.jar;com-google-android-gms.play-services-tagmanager-v4-impl.16.0.8.dex.jar;com-google-android-gms.play-services-tasks.16.0.1.dex.jar;com-google-android-gms.play-services-wallet.16.0.1.dex.jar;com-google-firebase.firebase-analytics.16.4.0.dex.jar;com-google-firebase.firebase-common.16.1.0.dex.jar;com-google-firebase.firebase-iid-interop.16.0.1.dex.jar;com-google-firebase.firebase-iid.17.1.1.dex.jar;com-google-firebase.firebase-measurement-connector.17.0.1.dex.jar;com-google-firebase.firebase-messaging.17.5.0.dex.jar;fmx.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar
-
-
- DBXSqliteDriver;RESTComponents;fmxase;DBXInterBaseDriver;emsclientfiredac;tethering;DataSnapFireDAC;bindcompfmx;FmxTeeUI;fmx;FireDACIBDriver;FireDACDBXDriver;dbexpress;IndyCore;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;soapserver;bindengine;CloudService;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;FireDACSqliteDriver;ibmonitor;FMXTee;soaprtl;DbxCommonDriver;ibxpress;xmlrtl;soapmidas;DataSnapNativeClient;FireDACDSDriver;rtl;DbxClientDriver;ibxbindings;CustomIPTransport;bindcomp;IndyIPClient;dbxcds;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;$(DCC_UsePackage)
-
-
- DBXSqliteDriver;RESTComponents;fmxase;DBXInterBaseDriver;emsclientfiredac;tethering;DataSnapFireDAC;bindcompfmx;FmxTeeUI;fmx;FireDACIBDriver;FireDACDBXDriver;dbexpress;IndyCore;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;soapserver;bindengine;CloudService;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;FireDACSqliteDriver;ibmonitor;FMXTee;soaprtl;DbxCommonDriver;ibxpress;xmlrtl;soapmidas;DataSnapNativeClient;FireDACDSDriver;rtl;DbxClientDriver;ibxbindings;CustomIPTransport;bindcomp;IndyIPClient;dbxcds;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;$(DCC_UsePackage)
-
-
- RESTComponents;emsclientfiredac;DataSnapFireDAC;FireDACADSDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;inetdb;emsedge;fmx;FireDACIBDriver;dbexpress;IndyCore;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;DataSnapConnectors;soapserver;bindengine;CloudService;FireDACOracleDriver;FireDACMySQLDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;IndySystem;FireDACDb2Driver;FireDACInfxDriver;FireDAC;emshosting;FireDACSqliteDriver;FireDACPgDriver;FireDACASADriver;FireDACTDataDriver;soaprtl;DbxCommonDriver;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;rtl;emsserverresource;DbxClientDriver;CustomIPTransport;bindcomp;dbxcds;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;dbrtl;IndyProtocols;FireDACMongoDBDriver;DataSnapServerMidas;$(DCC_UsePackage)
-
-
- DBXSqliteDriver;RESTComponents;fmxase;DBXInterBaseDriver;emsclientfiredac;tethering;DataSnapFireDAC;FireDACMSSQLDriver;bindcompfmx;DBXOracleDriver;inetdb;FmxTeeUI;fmx;FireDACIBDriver;fmxdae;FireDACDBXDriver;dbexpress;IndyCore;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;soapserver;bindengine;DBXMySQLDriver;CloudService;FireDACOracleDriver;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;ibxpress;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;FireDACDSDriver;rtl;DbxClientDriver;ibxbindings;DBXSybaseASADriver;CustomIPTransport;bindcomp;DBXInformixDriver;IndyIPClient;dbxcds;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;inetdbxpress;FireDACMongoDBDriver;DataSnapServerMidas;$(DCC_UsePackage)
- true
-
-
- DBXSqliteDriver;RESTComponents;fmxase;DBXDb2Driver;DBXInterBaseDriver;vclactnband;vclFireDAC;bindcompvclsmp;emsclientfiredac;tethering;svnui;DataSnapFireDAC;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;svn;DBXOracleDriver;inetdb;FmxTeeUI;emsedge;fmx;FireDACIBDriver;fmxdae;vcledge;vclib;FireDACDBXDriver;dbexpress;IndyCore;vclx;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;vclie;bindengine;DBXMySQLDriver;CloudService;FireDACOracleDriver;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;vcl;IndyIPServer;DBXSybaseASEDriver;IndySystem;FireDACDb2Driver;bindcompvclwinx;dsnapcon;madExcept_;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;madBasic_;TeeDB;FireDAC;emshosting;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;ibxpress;Tee;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;FireDACDSDriver;rtl;emsserverresource;DbxClientDriver;ibxbindings;DBXSybaseASADriver;madDisAsm_;CustomIPTransport;vcldsnap;bindcomp;appanalytics;DBXInformixDriver;IndyIPClient;bindcompvcl;TeeUI;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;inetdbxpress;FireDACMongoDBDriver;DataSnapServerMidas;$(DCC_UsePackage)
- Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
- Debug
- CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=
- 1033
- true
- $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png
- $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png
-
-
- DBXSqliteDriver;RESTComponents;fmxase;DBXDb2Driver;DBXInterBaseDriver;vclactnband;vclFireDAC;bindcompvclsmp;emsclientfiredac;tethering;DataSnapFireDAC;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;DBXOracleDriver;inetdb;FmxTeeUI;emsedge;fmx;FireDACIBDriver;fmxdae;vcledge;vclib;FireDACDBXDriver;dbexpress;IndyCore;vclx;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;vclie;bindengine;DBXMySQLDriver;CloudService;FireDACOracleDriver;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;vcl;IndyIPServer;DBXSybaseASEDriver;IndySystem;FireDACDb2Driver;bindcompvclwinx;dsnapcon;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;TeeDB;FireDAC;emshosting;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;ibxpress;Tee;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;FireDACDSDriver;rtl;emsserverresource;DbxClientDriver;ibxbindings;DBXSybaseASADriver;CustomIPTransport;vcldsnap;bindcomp;appanalytics;DBXInformixDriver;IndyIPClient;bindcompvcl;TeeUI;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;inetdbxpress;FireDACMongoDBDriver;DataSnapServerMidas;$(DCC_UsePackage)
- true
- $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png
- $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png
-
-
- DEBUG;$(DCC_Define)
- true
- false
- true
- true
- true
-
-
- false
- ..\..\src\core;..\..\src\validators;..\..\src\sanitializators;$(DCC_UnitSearchPath)
- 1033
- (None)
-
-
- false
- RELEASE;$(DCC_Define)
- 0
- 0
-
-
-
- MainSource
-
-
- Cfg_2
- Base
-
-
- Base
-
-
- Cfg_1
- Base
-
-
-
- Delphi.Personality.12
- Application
-
-
-
- Model8.dpr
-
-
- Embarcadero C++Builder Office 2000 Servers Package
- Embarcadero C++Builder Office XP Servers Package
- Microsoft Office 2000 Sample Automation Server Wrapper Components
- Microsoft Office XP Sample Automation Server Wrapper Components
-
-
-
-
-
- true
-
-
-
-
- true
-
-
-
-
- true
-
-
-
-
- Model8.exe
- true
-
-
-
-
- 1
-
-
- Contents\MacOS
- 1
-
-
- 0
-
-
-
-
- classes
- 1
-
-
- classes
- 1
-
-
-
-
- res\xml
- 1
-
-
- res\xml
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
-
-
- library\lib\armeabi
- 1
-
-
- library\lib\armeabi
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
-
-
- library\lib\mips
- 1
-
-
- library\lib\mips
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
- library\lib\arm64-v8a
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
-
-
- res\drawable
- 1
-
-
- res\drawable
- 1
-
-
-
-
- res\values
- 1
-
-
- res\values
- 1
-
-
-
-
- res\values-v21
- 1
-
-
- res\values-v21
- 1
-
-
-
-
- res\values
- 1
-
-
- res\values
- 1
-
-
-
-
- res\drawable
- 1
-
-
- res\drawable
- 1
-
-
-
-
- res\drawable-xxhdpi
- 1
-
-
- res\drawable-xxhdpi
- 1
-
-
-
-
- res\drawable-xxxhdpi
- 1
-
-
- res\drawable-xxxhdpi
- 1
-
-
-
-
- res\drawable-ldpi
- 1
-
-
- res\drawable-ldpi
- 1
-
-
-
-
- res\drawable-mdpi
- 1
-
-
- res\drawable-mdpi
- 1
-
-
-
-
- res\drawable-hdpi
- 1
-
-
- res\drawable-hdpi
- 1
-
-
-
-
- res\drawable-xhdpi
- 1
-
-
- res\drawable-xhdpi
- 1
-
-
-
-
- res\drawable-mdpi
- 1
-
-
- res\drawable-mdpi
- 1
-
-
-
-
- res\drawable-hdpi
- 1
-
-
- res\drawable-hdpi
- 1
-
-
-
-
- res\drawable-xhdpi
- 1
-
-
- res\drawable-xhdpi
- 1
-
-
-
-
- res\drawable-xxhdpi
- 1
-
-
- res\drawable-xxhdpi
- 1
-
-
-
-
- res\drawable-xxxhdpi
- 1
-
-
- res\drawable-xxxhdpi
- 1
-
-
-
-
- res\drawable-small
- 1
-
-
- res\drawable-small
- 1
-
-
-
-
- res\drawable-normal
- 1
-
-
- res\drawable-normal
- 1
-
-
-
-
- res\drawable-large
- 1
-
-
- res\drawable-large
- 1
-
-
-
-
- res\drawable-xlarge
- 1
-
-
- res\drawable-xlarge
- 1
-
-
-
-
- res\values
- 1
-
-
- res\values
- 1
-
-
-
-
- 1
-
-
- Contents\MacOS
- 1
-
-
- 0
-
-
-
-
- Contents\MacOS
- 1
- .framework
-
-
- Contents\MacOS
- 1
- .framework
-
-
- 0
-
-
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- Contents\MacOS
- 1
- .dylib
-
-
- Contents\MacOS
- 1
- .dylib
-
-
- 0
- .dll;.bpl
-
-
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- Contents\MacOS
- 1
- .dylib
-
-
- Contents\MacOS
- 1
- .dylib
-
-
- 0
- .bpl
-
-
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- Contents\Resources\StartUp\
- 0
-
-
- Contents\Resources\StartUp\
- 0
-
-
- 0
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- 1
-
-
- 1
-
-
-
-
- ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
- 1
-
-
- ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
- 1
-
-
-
-
- ..\
- 1
-
-
- ..\
- 1
-
-
-
-
- 1
-
-
- 1
-
-
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen
- 64
-
-
- ..\$(PROJECTNAME).launchscreen
- 64
-
-
-
-
- 1
-
-
- 1
-
-
- 1
-
-
-
-
- ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
- 1
-
-
-
-
- ..\
- 1
-
-
- ..\
- 1
-
-
-
-
- Contents
- 1
-
-
- Contents
- 1
-
-
-
-
- Contents\Resources
- 1
-
-
- Contents\Resources
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
- library\lib\arm64-v8a
- 1
-
-
- 1
-
-
- 1
-
-
- 1
-
-
- 1
-
-
- Contents\MacOS
- 1
-
-
- Contents\MacOS
- 1
-
-
- 0
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
-
-
- 1
-
-
- 1
-
-
-
-
- Assets
- 1
-
-
- Assets
- 1
-
-
-
-
- Assets
- 1
-
-
- Assets
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- False
- False
- False
- False
- False
- False
- True
- False
-
-
- 12
-
-
-
-
-
diff --git a/samples/Model 8 - Horse/boss-lock.json b/samples/Model 8 - Horse/boss-lock.json
deleted file mode 100644
index 51851a9..0000000
--- a/samples/Model 8 - Horse/boss-lock.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "hash": "d41d8cd98f00b204e9800998ecf8427e",
- "updated": "2021-07-13T15:54:02.4357378-03:00",
- "installedModules": {
- "github.com/hashload/horse": {
- "name": "horse",
- "version": "2.0.13",
- "hash": "985da2054d3c705bc211797c653e47ba",
- "artifacts": {},
- "failed": false,
- "changed": false
- },
- "github.com/hashload/jhonson": {
- "name": "jhonson",
- "version": "1.1.2",
- "hash": "85d9b3c97b5144448440d7d26bdd16de",
- "artifacts": {},
- "failed": false,
- "changed": false
- }
- }
-}
\ No newline at end of file
diff --git a/samples/Model 8 - Horse/boss.json b/samples/Model 8 - Horse/boss.json
deleted file mode 100644
index 0dfc55d..0000000
--- a/samples/Model 8 - Horse/boss.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "name": "Model 8 - Horse",
- "description": "",
- "version": "1.0.0",
- "homepage": "",
- "mainsrc": "./",
- "projects": [],
- "dependencies": {
- "github.com/hashload/horse": "^2.0.13",
- "github.com/hashload/jhonson": "^1.1.2"
- }
-}
\ No newline at end of file
diff --git a/samples/Model 9 - Horse 2/Model9.dpr b/samples/Model 9 - Horse 2/Model9.dpr
deleted file mode 100644
index c456948..0000000
--- a/samples/Model 9 - Horse 2/Model9.dpr
+++ /dev/null
@@ -1,163 +0,0 @@
-program Model9;
-
-uses
- DataValidator,
- Horse,
- Horse.Jhonson,
- System.JSON,
- System.SysUtils,
- System.DateUtils;
-
-function ValidateRegister(const AJSON: TJSONObject): IDataValidatorResult;
-begin
- Result :=
- TDataValidator.JSON(AJSON)
- .Validate('nome')
- .Key
- .IsRequired.WithMessage('Key "nome" no informado!')
- .&End
-
- .Value
- .Trim
- .&Not.IsEmpty.WithMessage('O campo nome no foi preenchido!')
- .IsAlpha(TDataValidatorLocaleLanguage.tl_pt_BR).WithMessage('O campo nome no pode possuir caracters especiais!')
- .IsLength(3, 100).WithMessage('O campo nome deve ter no mnimo 3 caracters e no mzimo 100')
- .&End
- .&End
-
- .Validate('email')
- .Key
- .IsRequired.WithMessage('Key "email" no informado!')
- .&End
-
- .Value
- .Trim
- .&Not.IsEmpty.WithMessage('Informe o e-mail!')
- .IsLength(6, 100).WithMessage('Informe um e-mail maior que 5 caracteres!')
- .NormalizeEmail(True, False).IsEmail.WithMessage('E-mail invlido!')
- .CustomValue(
- function(const AValue: string): Boolean
- begin
- // Recebe o valor no AValue para analisar e fazer o que for necessrio
- //
- // Ex:
- // Consulta no banco verifica se esse email j existe;
- //
- // Result -> True = significa tudo certo! - False = significa que tem algum problema
-
- Result := AValue = 'developer.dlio@gmail.com';
-
- end).WithMessage('E-mail j cadastrado!')
- .&End
- .&End
-
- .Validate('data_nascimento')
- .Key
- .IsRequired.WithMessage('Key "data_nascimento" no informado!')
- .&End
-
- .Value
- .Trim
- .&Not.IsEmpty.WithMessage('Informe a data de nascimento!')
- .IsDate.WithMessage('Data de nascimento invlido!')
- .IsDateLessThan(Now).WithMessage('A data de nascimento no pode ser maior que a data atual!')
- .IsDateGreaterThan(IncYear(Now, -100)).WithMessage('A data de nascimento no pode ser menor que 100 anos atrs!')
- .&End
- .&End
-
- .Validate('telefone')
- .Key
- .IsRequired.WithMessage('Key "telefone" no informado!')
- .&End
-
- .Value
- .Trim
- .&Not.IsEmpty.WithMessage('Informe o telefone!')
- .IsPhoneNumber(TDataValidatorLocaleLanguage.tl_pt_BR).WithMessage('Nmero de telefone invlido!')
- .&End
- .&End
-
- .Validate('cpf')
- .Key
- .IsRequired.WithMessage('Key "cpf" no informado!')
- .&End
-
- .Value
- .Trim
- .&Not.IsEmpty.WithMessage('Informe o CPF!')
- .IsLength(14, 14).WithMessage('Informe corretamente todos os dgitos do CPF!')
- .OnlyNumbers.IsCPF.WithMessage('CPF invlido!')
- .&End
- .&End
-
- .CheckAll;
-end;
-
-begin
-// Router:
-// POST http://localhost:9000/register
-
-// Body
-// JSON Test
-{
- "nome":"Danilo Lucas",
- "email":"developer.dlio@gmail.com",
- "data_nascimento":"23/08/1994",
- "telefone":"48999999999",
- "cpf":"012.345.678-90"
-}
-
-
- THorse.Use(Jhonson());
-
- THorse.Post('/register',
- procedure(Req: THorseRequest; Res: THorseResponse; Next: TProc)
- var
- LBody: TJSONObject;
- LValidatorResult: IDataValidatorResult;
- LResponse: TJsonObject;
- LReponseErrorCause: TJsonArray;
- I: Integer;
- begin
- try
- LBody := Req.Body;
- except
- LBody := nil;
- end;
-
- if not Assigned(LBody) then
- begin
- Res.Status(401).Send('No foi informado o JSON no body corretamente!');
- raise EHorseCallbackInterrupted.Create;
- end;
-
- // faz a validao completa
- LValidatorResult := ValidateRegister(LBody);
-
- // Se tive tudo ok, j faz o retorno
- if LValidatorResult.OK then
- begin
- LResponse := TJsonObject.Create;
- LResponse.AddPair('error', TJSONBool.Create(False));
- LResponse.AddPair('message', TJSONString.Create('Registrado com sucesso!'));
- LResponse.AddPair('data', LBody.Clone as TJSONObject);
-
- Res.Status(201).Send(LResponse);
- raise EHorseCallbackInterrupted.Create;
- end;
-
- // Faz a exibio da mensagem de erro!
- LReponseErrorCause := TJsonArray.Create;
- for I := 0 to Pred(LValidatorResult.Informations.Count) do
- LReponseErrorCause.Add(LValidatorResult.Informations.GetItem(I).Message);
-
- LResponse := TJsonObject.Create;
- LResponse.AddPair('error', TJSONBool.Create(True));
- LResponse.AddPair('causes', LReponseErrorCause);
-
- Res.Send(LResponse);
- end);
-
- THorse.Listen(9000);
-
-end.
diff --git a/samples/Model 9 - Horse 2/Model9.dproj b/samples/Model 9 - Horse 2/Model9.dproj
deleted file mode 100644
index 62a53b5..0000000
--- a/samples/Model 9 - Horse 2/Model9.dproj
+++ /dev/null
@@ -1,1011 +0,0 @@
-
-
- {4C2DBE56-AB55-441D-BA4C-73841D28AB8B}
- 19.2
- None
- True
- Debug
- Win32
- 1
- Console
- Model9.dpr
-
-
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Cfg_1
- true
- true
-
-
- true
- Base
- true
-
-
- .\$(Platform)\$(Config)
- .\$(Platform)\$(Config)
- false
- false
- false
- false
- false
- System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)
- Model9
- modules\.dcp;modules\.dcu;modules;modules\horse\src;modules\jhonson\src;$(DCC_UnitSearchPath)
-
-
- DBXSqliteDriver;RESTComponents;DBXInterBaseDriver;emsclientfiredac;tethering;DataSnapFireDAC;bindcompfmx;FmxTeeUI;fmx;FireDACIBDriver;FireDACDBXDriver;dbexpress;IndyCore;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;soapserver;bindengine;CloudService;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;FireDACSqliteDriver;ibmonitor;FMXTee;soaprtl;DbxCommonDriver;ibxpress;xmlrtl;soapmidas;DataSnapNativeClient;FireDACDSDriver;rtl;DbxClientDriver;ibxbindings;CustomIPTransport;bindcomp;IndyIPClient;dbxcds;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;$(DCC_UsePackage)
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_36x36.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_48x48.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_72x72.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_96x96.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_144x144.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_426x320.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_470x320.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_640x480.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_960x720.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_24x24.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_36x36.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_48x48.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_72x72.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_96x96.png
- android-support-v4.dex.jar;cloud-messaging.dex.jar;com-google-android-gms.play-services-ads-base.17.2.0.dex.jar;com-google-android-gms.play-services-ads-identifier.16.0.0.dex.jar;com-google-android-gms.play-services-ads-lite.17.2.0.dex.jar;com-google-android-gms.play-services-ads.17.2.0.dex.jar;com-google-android-gms.play-services-analytics-impl.16.0.8.dex.jar;com-google-android-gms.play-services-analytics.16.0.8.dex.jar;com-google-android-gms.play-services-base.16.0.1.dex.jar;com-google-android-gms.play-services-basement.16.2.0.dex.jar;com-google-android-gms.play-services-gass.17.2.0.dex.jar;com-google-android-gms.play-services-identity.16.0.0.dex.jar;com-google-android-gms.play-services-maps.16.1.0.dex.jar;com-google-android-gms.play-services-measurement-base.16.4.0.dex.jar;com-google-android-gms.play-services-measurement-sdk-api.16.4.0.dex.jar;com-google-android-gms.play-services-stats.16.0.1.dex.jar;com-google-android-gms.play-services-tagmanager-v4-impl.16.0.8.dex.jar;com-google-android-gms.play-services-tasks.16.0.1.dex.jar;com-google-android-gms.play-services-wallet.16.0.1.dex.jar;com-google-firebase.firebase-analytics.16.4.0.dex.jar;com-google-firebase.firebase-common.16.1.0.dex.jar;com-google-firebase.firebase-iid-interop.16.0.1.dex.jar;com-google-firebase.firebase-iid.17.1.1.dex.jar;com-google-firebase.firebase-measurement-connector.17.0.1.dex.jar;com-google-firebase.firebase-messaging.17.5.0.dex.jar;fmx.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar
-
-
- DBXSqliteDriver;RESTComponents;DBXInterBaseDriver;emsclientfiredac;tethering;DataSnapFireDAC;bindcompfmx;FmxTeeUI;fmx;FireDACIBDriver;FireDACDBXDriver;dbexpress;IndyCore;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;soapserver;bindengine;CloudService;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;FireDACSqliteDriver;ibmonitor;FMXTee;soaprtl;DbxCommonDriver;ibxpress;xmlrtl;soapmidas;DataSnapNativeClient;FireDACDSDriver;rtl;DbxClientDriver;ibxbindings;CustomIPTransport;bindcomp;IndyIPClient;dbxcds;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;$(DCC_UsePackage)
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_36x36.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_48x48.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_72x72.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_96x96.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_144x144.png
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_426x320.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_470x320.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_640x480.png
- $(BDS)\bin\Artwork\Android\FM_SplashImage_960x720.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_24x24.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_36x36.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_48x48.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_72x72.png
- $(BDS)\bin\Artwork\Android\FM_NotificationIcon_96x96.png
- android-support-v4.dex.jar;cloud-messaging.dex.jar;com-google-android-gms.play-services-ads-base.17.2.0.dex.jar;com-google-android-gms.play-services-ads-identifier.16.0.0.dex.jar;com-google-android-gms.play-services-ads-lite.17.2.0.dex.jar;com-google-android-gms.play-services-ads.17.2.0.dex.jar;com-google-android-gms.play-services-analytics-impl.16.0.8.dex.jar;com-google-android-gms.play-services-analytics.16.0.8.dex.jar;com-google-android-gms.play-services-base.16.0.1.dex.jar;com-google-android-gms.play-services-basement.16.2.0.dex.jar;com-google-android-gms.play-services-gass.17.2.0.dex.jar;com-google-android-gms.play-services-identity.16.0.0.dex.jar;com-google-android-gms.play-services-maps.16.1.0.dex.jar;com-google-android-gms.play-services-measurement-base.16.4.0.dex.jar;com-google-android-gms.play-services-measurement-sdk-api.16.4.0.dex.jar;com-google-android-gms.play-services-stats.16.0.1.dex.jar;com-google-android-gms.play-services-tagmanager-v4-impl.16.0.8.dex.jar;com-google-android-gms.play-services-tasks.16.0.1.dex.jar;com-google-android-gms.play-services-wallet.16.0.1.dex.jar;com-google-firebase.firebase-analytics.16.4.0.dex.jar;com-google-firebase.firebase-common.16.1.0.dex.jar;com-google-firebase.firebase-iid-interop.16.0.1.dex.jar;com-google-firebase.firebase-iid.17.1.1.dex.jar;com-google-firebase.firebase-measurement-connector.17.0.1.dex.jar;com-google-firebase.firebase-messaging.17.5.0.dex.jar;fmx.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar
-
-
- DBXSqliteDriver;RESTComponents;fmxase;DBXInterBaseDriver;emsclientfiredac;tethering;DataSnapFireDAC;bindcompfmx;FmxTeeUI;fmx;FireDACIBDriver;FireDACDBXDriver;dbexpress;IndyCore;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;soapserver;bindengine;CloudService;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;FireDACSqliteDriver;ibmonitor;FMXTee;soaprtl;DbxCommonDriver;ibxpress;xmlrtl;soapmidas;DataSnapNativeClient;FireDACDSDriver;rtl;DbxClientDriver;ibxbindings;CustomIPTransport;bindcomp;IndyIPClient;dbxcds;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;$(DCC_UsePackage)
-
-
- DBXSqliteDriver;RESTComponents;fmxase;DBXInterBaseDriver;emsclientfiredac;tethering;DataSnapFireDAC;bindcompfmx;FmxTeeUI;fmx;FireDACIBDriver;FireDACDBXDriver;dbexpress;IndyCore;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;soapserver;bindengine;CloudService;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;FireDACSqliteDriver;ibmonitor;FMXTee;soaprtl;DbxCommonDriver;ibxpress;xmlrtl;soapmidas;DataSnapNativeClient;FireDACDSDriver;rtl;DbxClientDriver;ibxbindings;CustomIPTransport;bindcomp;IndyIPClient;dbxcds;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;$(DCC_UsePackage)
-
-
- RESTComponents;emsclientfiredac;DataSnapFireDAC;FireDACADSDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;inetdb;emsedge;fmx;FireDACIBDriver;dbexpress;IndyCore;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;DataSnapConnectors;soapserver;bindengine;CloudService;FireDACOracleDriver;FireDACMySQLDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;IndySystem;FireDACDb2Driver;FireDACInfxDriver;FireDAC;emshosting;FireDACSqliteDriver;FireDACPgDriver;FireDACASADriver;FireDACTDataDriver;soaprtl;DbxCommonDriver;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;rtl;emsserverresource;DbxClientDriver;CustomIPTransport;bindcomp;dbxcds;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;dbrtl;IndyProtocols;FireDACMongoDBDriver;DataSnapServerMidas;$(DCC_UsePackage)
-
-
- DBXSqliteDriver;RESTComponents;fmxase;DBXInterBaseDriver;emsclientfiredac;tethering;DataSnapFireDAC;FireDACMSSQLDriver;bindcompfmx;DBXOracleDriver;inetdb;FmxTeeUI;fmx;FireDACIBDriver;fmxdae;FireDACDBXDriver;dbexpress;IndyCore;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;soapserver;bindengine;DBXMySQLDriver;CloudService;FireDACOracleDriver;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;ibxpress;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;FireDACDSDriver;rtl;DbxClientDriver;ibxbindings;DBXSybaseASADriver;CustomIPTransport;bindcomp;DBXInformixDriver;IndyIPClient;dbxcds;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;inetdbxpress;FireDACMongoDBDriver;DataSnapServerMidas;$(DCC_UsePackage)
- true
-
-
- DBXSqliteDriver;RESTComponents;fmxase;DBXDb2Driver;DBXInterBaseDriver;vclactnband;vclFireDAC;bindcompvclsmp;emsclientfiredac;tethering;svnui;DataSnapFireDAC;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;svn;DBXOracleDriver;inetdb;FmxTeeUI;emsedge;fmx;FireDACIBDriver;fmxdae;vcledge;vclib;FireDACDBXDriver;dbexpress;IndyCore;vclx;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;vclie;bindengine;DBXMySQLDriver;CloudService;FireDACOracleDriver;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;vcl;IndyIPServer;DBXSybaseASEDriver;IndySystem;FireDACDb2Driver;bindcompvclwinx;dsnapcon;madExcept_;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;madBasic_;TeeDB;FireDAC;emshosting;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;ibxpress;Tee;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;FireDACDSDriver;rtl;emsserverresource;DbxClientDriver;ibxbindings;DBXSybaseASADriver;madDisAsm_;CustomIPTransport;vcldsnap;bindcomp;appanalytics;DBXInformixDriver;IndyIPClient;bindcompvcl;TeeUI;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;inetdbxpress;FireDACMongoDBDriver;DataSnapServerMidas;$(DCC_UsePackage)
- Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
- Debug
- CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=
- 1033
- true
- $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png
- $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png
-
-
- DBXSqliteDriver;RESTComponents;fmxase;DBXDb2Driver;DBXInterBaseDriver;vclactnband;vclFireDAC;bindcompvclsmp;emsclientfiredac;tethering;DataSnapFireDAC;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;DBXOracleDriver;inetdb;FmxTeeUI;emsedge;fmx;FireDACIBDriver;fmxdae;vcledge;vclib;FireDACDBXDriver;dbexpress;IndyCore;vclx;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;vclie;bindengine;DBXMySQLDriver;CloudService;FireDACOracleDriver;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;vcl;IndyIPServer;DBXSybaseASEDriver;IndySystem;FireDACDb2Driver;bindcompvclwinx;dsnapcon;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;TeeDB;FireDAC;emshosting;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;ibxpress;Tee;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;FireDACDSDriver;rtl;emsserverresource;DbxClientDriver;ibxbindings;DBXSybaseASADriver;CustomIPTransport;vcldsnap;bindcomp;appanalytics;DBXInformixDriver;IndyIPClient;bindcompvcl;TeeUI;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;inetdbxpress;FireDACMongoDBDriver;DataSnapServerMidas;$(DCC_UsePackage)
- true
- $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png
- $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png
-
-
- DEBUG;$(DCC_Define)
- true
- false
- true
- true
- true
-
-
- false
- ..\..\src\core;..\..\src\sanitializators;..\..\src\validators;$(DCC_UnitSearchPath)
- 1033
- (None)
-
-
- false
- RELEASE;$(DCC_Define)
- 0
- 0
-
-
-
- MainSource
-
-
- Cfg_2
- Base
-
-
- Base
-
-
- Cfg_1
- Base
-
-
-
- Delphi.Personality.12
- Application
-
-
-
- Model9.dpr
-
-
- Embarcadero C++Builder Office 2000 Servers Package
- Embarcadero C++Builder Office XP Servers Package
- Microsoft Office 2000 Sample Automation Server Wrapper Components
- Microsoft Office XP Sample Automation Server Wrapper Components
-
-
-
-
-
- true
-
-
-
-
- true
-
-
-
-
- true
-
-
-
-
- Model9.exe
- true
-
-
-
-
- 1
-
-
- Contents\MacOS
- 1
-
-
- 0
-
-
-
-
- classes
- 1
-
-
- classes
- 1
-
-
-
-
- res\xml
- 1
-
-
- res\xml
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
-
-
- library\lib\armeabi
- 1
-
-
- library\lib\armeabi
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
-
-
- library\lib\mips
- 1
-
-
- library\lib\mips
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
- library\lib\arm64-v8a
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
-
-
- res\drawable
- 1
-
-
- res\drawable
- 1
-
-
-
-
- res\values
- 1
-
-
- res\values
- 1
-
-
-
-
- res\values-v21
- 1
-
-
- res\values-v21
- 1
-
-
-
-
- res\values
- 1
-
-
- res\values
- 1
-
-
-
-
- res\drawable
- 1
-
-
- res\drawable
- 1
-
-
-
-
- res\drawable-xxhdpi
- 1
-
-
- res\drawable-xxhdpi
- 1
-
-
-
-
- res\drawable-xxxhdpi
- 1
-
-
- res\drawable-xxxhdpi
- 1
-
-
-
-
- res\drawable-ldpi
- 1
-
-
- res\drawable-ldpi
- 1
-
-
-
-
- res\drawable-mdpi
- 1
-
-
- res\drawable-mdpi
- 1
-
-
-
-
- res\drawable-hdpi
- 1
-
-
- res\drawable-hdpi
- 1
-
-
-
-
- res\drawable-xhdpi
- 1
-
-
- res\drawable-xhdpi
- 1
-
-
-
-
- res\drawable-mdpi
- 1
-
-
- res\drawable-mdpi
- 1
-
-
-
-
- res\drawable-hdpi
- 1
-
-
- res\drawable-hdpi
- 1
-
-
-
-
- res\drawable-xhdpi
- 1
-
-
- res\drawable-xhdpi
- 1
-
-
-
-
- res\drawable-xxhdpi
- 1
-
-
- res\drawable-xxhdpi
- 1
-
-
-
-
- res\drawable-xxxhdpi
- 1
-
-
- res\drawable-xxxhdpi
- 1
-
-
-
-
- res\drawable-small
- 1
-
-
- res\drawable-small
- 1
-
-
-
-
- res\drawable-normal
- 1
-
-
- res\drawable-normal
- 1
-
-
-
-
- res\drawable-large
- 1
-
-
- res\drawable-large
- 1
-
-
-
-
- res\drawable-xlarge
- 1
-
-
- res\drawable-xlarge
- 1
-
-
-
-
- res\values
- 1
-
-
- res\values
- 1
-
-
-
-
- 1
-
-
- Contents\MacOS
- 1
-
-
- 0
-
-
-
-
- Contents\MacOS
- 1
- .framework
-
-
- Contents\MacOS
- 1
- .framework
-
-
- 0
-
-
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- Contents\MacOS
- 1
- .dylib
-
-
- Contents\MacOS
- 1
- .dylib
-
-
- 0
- .dll;.bpl
-
-
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- Contents\MacOS
- 1
- .dylib
-
-
- Contents\MacOS
- 1
- .dylib
-
-
- 0
- .bpl
-
-
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- Contents\Resources\StartUp\
- 0
-
-
- Contents\Resources\StartUp\
- 0
-
-
- 0
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- 1
-
-
- 1
-
-
-
-
- ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
- 1
-
-
- ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
- 1
-
-
-
-
- ..\
- 1
-
-
- ..\
- 1
-
-
-
-
- 1
-
-
- 1
-
-
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen
- 64
-
-
- ..\$(PROJECTNAME).launchscreen
- 64
-
-
-
-
- 1
-
-
- 1
-
-
- 1
-
-
-
-
- ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
- 1
-
-
-
-
- ..\
- 1
-
-
- ..\
- 1
-
-
-
-
- Contents
- 1
-
-
- Contents
- 1
-
-
-
-
- Contents\Resources
- 1
-
-
- Contents\Resources
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
- library\lib\arm64-v8a
- 1
-
-
- 1
-
-
- 1
-
-
- 1
-
-
- 1
-
-
- Contents\MacOS
- 1
-
-
- Contents\MacOS
- 1
-
-
- 0
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
-
-
- 1
-
-
- 1
-
-
-
-
- Assets
- 1
-
-
- Assets
- 1
-
-
-
-
- Assets
- 1
-
-
- Assets
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- False
- False
- False
- False
- False
- False
- True
- False
-
-
- 12
-
-
-
-
-
diff --git a/samples/Model 9 - Horse 2/boss-lock.json b/samples/Model 9 - Horse 2/boss-lock.json
deleted file mode 100644
index 349aa37..0000000
--- a/samples/Model 9 - Horse 2/boss-lock.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "hash": "d41d8cd98f00b204e9800998ecf8427e",
- "updated": "2021-07-13T16:42:43.502442-03:00",
- "installedModules": {
- "github.com/hashload/horse": {
- "name": "horse",
- "version": "2.0.13",
- "hash": "985da2054d3c705bc211797c653e47ba",
- "artifacts": {},
- "failed": false,
- "changed": false
- },
- "github.com/hashload/jhonson": {
- "name": "jhonson",
- "version": "1.1.2",
- "hash": "85d9b3c97b5144448440d7d26bdd16de",
- "artifacts": {},
- "failed": false,
- "changed": false
- }
- }
-}
\ No newline at end of file
diff --git a/samples/Model 9 - Horse 2/boss.json b/samples/Model 9 - Horse 2/boss.json
deleted file mode 100644
index dbc6448..0000000
--- a/samples/Model 9 - Horse 2/boss.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "name": "Model 9 - Horse 2",
- "description": "",
- "version": "1.0.0",
- "homepage": "",
- "mainsrc": "./",
- "projects": [],
- "dependencies": {
- "github.com/hashload/horse": "^2.0.13",
- "github.com/hashload/jhonson": "^1.1.2"
- }
-}
\ No newline at end of file
diff --git a/samples/Values/Basic/Basic.delphilsp.json b/samples/Values/Basic/Basic.delphilsp.json
new file mode 100644
index 0000000..36a1e98
--- /dev/null
+++ b/samples/Values/Basic/Basic.delphilsp.json
@@ -0,0 +1 @@
+{ "settings": { "project": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/samples/Values/Basic/Basic.dpr", "dllname": "dcc32280.dll", "dccOptions": "-$O- -$W+ -$R+ -$Q+ --no-config -Q -TX.exe -AGenerics.Collections=System.Generics.Collections;Generics.Defaults=System.Generics.Defaults;WinTypes=Winapi.Windows;WinProcs=Winapi.Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -DDEBUG;;FRAMEWORK_VCL -E.\\Win32\\Debug -I\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\debug\";..\\..\\..\\src\\core;..\\..\\..\\src\\sanitializators;..\\..\\..\\src\\validators;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\release\";C:\\Users\\danil\\Documents\\Embarcadero\\Studio\\22.0\\Imports;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\Imports\";C:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\include\" -LEC:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Bpl -LNC:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp -NU.\\Win32\\Debug -NSWinapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell; -O..\\..\\..\\src\\core;..\\..\\..\\src\\sanitializators;..\\..\\..\\src\\validators;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\release\";C:\\Users\\danil\\Documents\\Embarcadero\\Studio\\22.0\\Imports;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\Imports\";C:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\include\" -R..\\..\\..\\src\\core;..\\..\\..\\src\\sanitializators;..\\..\\..\\src\\validators;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\release\";C:\\Users\\danil\\Documents\\Embarcadero\\Studio\\22.0\\Imports;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\Imports\";C:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\include\" -U\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\debug\";..\\..\\..\\src\\core;..\\..\\..\\src\\sanitializators;..\\..\\..\\src\\validators;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\release\";C:\\Users\\danil\\Documents\\Embarcadero\\Studio\\22.0\\Imports;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\Imports\";C:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\include\" -V -VN -NBC:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp -NHC:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\hpp\\Win32 -NO.\\Win32\\Debug -LU" , "projectFiles":[ { "name": "UBasic", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/samples/Values/Basic/UBasic.pas" } ] , "includeDCUsInUsesCompletion": true, "browsingPaths": [ "file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/OCX/Servers","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/SOURCE/VCL","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/rtl/common","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/SOURCE/RTL/SYS","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/rtl/win","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/rtl/win/winrt","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/ToolsAPI","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/SOURCE/IBX","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Internet","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/SOURCE/PROPERTY%20EDITORS","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/soap","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/SOURCE/XML","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Indy10/Core","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Indy10/System","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Indy10/Protocols","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/fmx","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/databinding/components","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/databinding/engine","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/databinding/graph","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/ado","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/cloud","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/datasnap","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/dbx","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/dsnap","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/vclctrls","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/datasnap/connectors","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/datasnap/proxygen","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DataExplorer","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/DUnitWizard/Source/Common","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/DUnitWizard/Source/Common/dunit","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/DUnitWizard/Source/DelphiExperts/Common","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/DUnitWizard/Source/DelphiExperts/DUnitProject","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/DUnitWizard/Source/DelphiExperts/DUnitProject/dunit","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/src","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/tests","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Experts","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/indy/abstraction","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/indy/implementation","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/indyimpl","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Property%20Editors/Indy10","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/soap/wsdlimporter","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Visualizers","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/XMLReporting","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/XPGen","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/rest","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/firedac","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/tethering","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnitX","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/ems","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/rtl/net","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/FlatBox2D" ] } }
\ No newline at end of file
diff --git a/samples/Values/Basic/Basic.dpr b/samples/Values/Basic/Basic.dpr
new file mode 100644
index 0000000..2019654
--- /dev/null
+++ b/samples/Values/Basic/Basic.dpr
@@ -0,0 +1,14 @@
+program Basic;
+
+uses
+ Vcl.Forms,
+ UBasic in 'UBasic.pas' {Form2};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.MainFormOnTaskbar := True;
+ Application.CreateForm(TForm2, Form2);
+ Application.Run;
+end.
diff --git a/samples/model 1/Model1.dproj b/samples/Values/Basic/Basic.dproj
similarity index 87%
rename from samples/model 1/Model1.dproj
rename to samples/Values/Basic/Basic.dproj
index 1620fc5..8c6bc44 100644
--- a/samples/model 1/Model1.dproj
+++ b/samples/Values/Basic/Basic.dproj
@@ -1,14 +1,14 @@
- {A6A5D959-838F-4691-9E20-3B5EEDEE1C9D}
- 19.2
+ {003881DF-B1A2-46DF-906B-76CFCE2C63D1}
+ 19.4
VCL
True
Debug
Win32
1
Application
- Model1.dpr
+ Basic.dpr
true
@@ -57,19 +57,23 @@
$(BDS)\bin\delphi_PROJECTICON.ico
$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png
$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png
- Model1
+ Basic
+ ..\..\..\src\core;..\..\..\src\sanitializators;..\..\..\src\validators;$(DCC_UnitSearchPath)
+ 1046
+ CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=
- DBXSqliteDriver;RESTComponents;fmxase;DBXDb2Driver;DBXInterBaseDriver;vclactnband;vclFireDAC;bindcompvclsmp;emsclientfiredac;tethering;svnui;DataSnapFireDAC;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;svn;DBXOracleDriver;inetdb;FmxTeeUI;emsedge;fmx;FireDACIBDriver;fmxdae;vcledge;vclib;FireDACDBXDriver;dbexpress;IndyCore;vclx;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;vclie;bindengine;DBXMySQLDriver;CloudService;FireDACOracleDriver;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;vcl;IndyIPServer;DBXSybaseASEDriver;IndySystem;FireDACDb2Driver;bindcompvclwinx;dsnapcon;madExcept_;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;madBasic_;TeeDB;FireDAC;emshosting;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;ibxpress;Tee;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;FireDACDSDriver;rtl;emsserverresource;DbxClientDriver;ibxbindings;DBXSybaseASADriver;madDisAsm_;CustomIPTransport;vcldsnap;bindcomp;appanalytics;DBXInformixDriver;IndyIPClient;bindcompvcl;TeeUI;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;inetdbxpress;FireDACMongoDBDriver;DataSnapServerMidas;$(DCC_UsePackage)
+ vclwinx;DataSnapServer;fmx;emshosting;vclie;DbxCommonDriver;bindengine;IndyIPCommon;VCLRESTComponents;DBXMSSQLDriver;FireDACCommonODBC;emsclient;FireDACCommonDriver;appanalytics;IndyProtocols;vclx;IndyIPClient;dbxcds;vcledge;bindcompvclwinx;FmxTeeUI;emsedge;bindcompfmx;DBXFirebirdDriver;inetdb;ibmonitor;FireDACSqliteDriver;DbxClientDriver;FireDACASADriver;Tee;soapmidas;vclactnband;TeeUI;fmxFireDAC;dbexpress;FireDACInfxDriver;DBXMySQLDriver;VclSmp;inet;DataSnapCommon;vcltouch;fmxase;DBXOdbcDriver;dbrtl;FireDACDBXDriver;FireDACOracleDriver;fmxdae;TeeDB;FireDACMSAccDriver;CustomIPTransport;FireDACMSSQLDriver;DataSnapIndy10ServerTransport;DataSnapConnectors;vcldsnap;DBXInterBaseDriver;FireDACMongoDBDriver;IndySystem;FireDACTDataDriver;vcldb;ibxbindings;vclFireDAC;bindcomp;FireDACCommon;DataSnapServerMidas;FireDACODBCDriver;emsserverresource;IndyCore;RESTBackendComponents;bindcompdbx;rtl;FireDACMySQLDriver;FireDACADSDriver;RESTComponents;DBXSqliteDriver;vcl;IndyIPServer;dsnapxml;dsnapcon;DataSnapClient;DataSnapProviderClient;adortl;DBXSybaseASEDriver;DBXDb2Driver;vclimg;DataSnapFireDAC;emsclientfiredac;FireDACPgDriver;FireDAC;FireDACDSDriver;inetdbxpress;xmlrtl;tethering;ibxpress;bindcompvcl;dsnap;CloudService;DBXSybaseASADriver;DBXOracleDriver;FireDACDb2Driver;DBXInformixDriver;vclib;fmxobj;bindcompvclsmp;DataSnapNativeClient;FMXTee;DatasnapConnectorsFreePascal;soaprtl;soapserver;FireDACIBDriver;$(DCC_UsePackage)
Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
Debug
true
CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=
1033
$(BDS)\bin\default_app.manifest
+ true
- DBXSqliteDriver;RESTComponents;fmxase;DBXDb2Driver;DBXInterBaseDriver;vclactnband;vclFireDAC;bindcompvclsmp;emsclientfiredac;tethering;DataSnapFireDAC;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;DBXOracleDriver;inetdb;FmxTeeUI;emsedge;fmx;FireDACIBDriver;fmxdae;vcledge;vclib;FireDACDBXDriver;dbexpress;IndyCore;vclx;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;vclie;bindengine;DBXMySQLDriver;CloudService;FireDACOracleDriver;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;vcl;IndyIPServer;DBXSybaseASEDriver;IndySystem;FireDACDb2Driver;bindcompvclwinx;dsnapcon;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;TeeDB;FireDAC;emshosting;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;ibxpress;Tee;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;FireDACDSDriver;rtl;emsserverresource;DbxClientDriver;ibxbindings;DBXSybaseASADriver;CustomIPTransport;vcldsnap;bindcomp;appanalytics;DBXInformixDriver;IndyIPClient;bindcompvcl;TeeUI;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;inetdbxpress;FireDACMongoDBDriver;DataSnapServerMidas;$(DCC_UsePackage)
+ vclwinx;DataSnapServer;fmx;emshosting;vclie;DbxCommonDriver;bindengine;IndyIPCommon;VCLRESTComponents;DBXMSSQLDriver;FireDACCommonODBC;emsclient;FireDACCommonDriver;appanalytics;IndyProtocols;vclx;IndyIPClient;dbxcds;vcledge;bindcompvclwinx;FmxTeeUI;emsedge;bindcompfmx;DBXFirebirdDriver;inetdb;ibmonitor;FireDACSqliteDriver;DbxClientDriver;FireDACASADriver;Tee;soapmidas;vclactnband;TeeUI;fmxFireDAC;dbexpress;FireDACInfxDriver;DBXMySQLDriver;VclSmp;inet;DataSnapCommon;vcltouch;fmxase;DBXOdbcDriver;dbrtl;FireDACDBXDriver;FireDACOracleDriver;fmxdae;TeeDB;FireDACMSAccDriver;CustomIPTransport;FireDACMSSQLDriver;DataSnapIndy10ServerTransport;DataSnapConnectors;vcldsnap;DBXInterBaseDriver;FireDACMongoDBDriver;IndySystem;FireDACTDataDriver;vcldb;ibxbindings;vclFireDAC;bindcomp;FireDACCommon;DataSnapServerMidas;FireDACODBCDriver;emsserverresource;IndyCore;RESTBackendComponents;bindcompdbx;rtl;FireDACMySQLDriver;FireDACADSDriver;RESTComponents;DBXSqliteDriver;vcl;IndyIPServer;dsnapxml;dsnapcon;DataSnapClient;DataSnapProviderClient;adortl;DBXSybaseASEDriver;DBXDb2Driver;vclimg;DataSnapFireDAC;emsclientfiredac;FireDACPgDriver;FireDAC;FireDACDSDriver;inetdbxpress;xmlrtl;tethering;ibxpress;bindcompvcl;dsnap;CloudService;DBXSybaseASADriver;DBXOracleDriver;FireDACDb2Driver;DBXInformixDriver;vclib;fmxobj;bindcompvclsmp;DataSnapNativeClient;FMXTee;DatasnapConnectorsFreePascal;soaprtl;soapserver;FireDACIBDriver;$(DCC_UsePackage)
DEBUG;$(DCC_Define)
@@ -78,12 +82,13 @@
true
true
true
+ true
+ true
false
true
PerMonitorV2
- ..\..\src\core;..\..\src\sanitializators;..\..\src\validators;$(DCC_UnitSearchPath)
true
1033
@@ -101,14 +106,10 @@
MainSource
-
-
+
+
dfm
-
- Cfg_2
- Base
-
Base
@@ -116,6 +117,10 @@
Cfg_1
Base
+
+ Cfg_2
+ Base
+
Delphi.Personality.12
@@ -123,19 +128,19 @@
- Model1.dpr
+ Basic.dpr
- Embarcadero C++Builder Office 2000 Servers Package
- Embarcadero C++Builder Office XP Servers Package
- Microsoft Office 2000 Sample Automation Server Wrapper Components
- Microsoft Office XP Sample Automation Server Wrapper Components
+ Embarcadero C++Builder Office 2000 Servers Package
+ Embarcadero C++Builder Office XP Servers Package
+ Microsoft Office 2000 Sample Automation Server Wrapper Components
+ Microsoft Office XP Sample Automation Server Wrapper Components
-
+
- Model1.exe
+ Basic.exe
true
@@ -151,14 +156,14 @@
0
-
+
classes
- 1
+ 64
classes
- 1
+ 64
@@ -452,6 +457,11 @@
1
.framework
+
+ Contents\MacOS
+ 1
+ .framework
+
0
@@ -479,6 +489,11 @@
1
.dylib
+
+ Contents\MacOS
+ 1
+ .dylib
+
0
.dll;.bpl
@@ -507,6 +522,11 @@
1
.dylib
+
+ Contents\MacOS
+ 1
+ .dylib
+
0
.bpl
@@ -536,6 +556,10 @@
Contents\Resources\StartUp\
0
+
+ Contents\Resources\StartUp\
+ 0
+
0
@@ -801,6 +825,10 @@
..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
1
+
+ ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
+ 1
+
@@ -811,6 +839,10 @@
..\
1
+
+ ..\
+ 1
+
@@ -821,6 +853,10 @@
Contents
1
+
+ Contents
+ 1
+
@@ -831,6 +867,10 @@
Contents\Resources
1
+
+ Contents\Resources
+ 1
+
@@ -861,6 +901,10 @@
Contents\MacOS
1
+
+ Contents\MacOS
+ 1
+
0
@@ -899,16 +943,17 @@
1
-
-
+
+
+
+
-
-
-
-
+
+
+
True
diff --git a/samples/Values/Basic/UBasic.dfm b/samples/Values/Basic/UBasic.dfm
new file mode 100644
index 0000000..79f20bc
--- /dev/null
+++ b/samples/Values/Basic/UBasic.dfm
@@ -0,0 +1,167 @@
+object Form2: TForm2
+ Left = 0
+ Top = 0
+ BorderIcons = [biSystemMenu, biMinimize]
+ Caption = 'DataValidator - Basic'
+ ClientHeight = 117
+ ClientWidth = 650
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -12
+ Font.Name = 'Segoe UI'
+ Font.Style = []
+ OnCreate = FormCreate
+ TextHeight = 15
+ object Panel1: TPanel
+ Left = 0
+ Top = 0
+ Width = 105
+ Height = 117
+ Align = alLeft
+ BevelOuter = bvNone
+ Color = 2565927
+ ParentBackground = False
+ TabOrder = 0
+ object btnLimpar: TButton
+ AlignWithMargins = True
+ Left = 3
+ Top = 3
+ Width = 99
+ Height = 25
+ Align = alTop
+ Caption = 'Limpar'
+ TabOrder = 0
+ OnClick = btnLimparClick
+ end
+ object btnCheck: TButton
+ AlignWithMargins = True
+ Left = 3
+ Top = 31
+ Width = 99
+ Height = 25
+ Margins.Top = 0
+ Align = alTop
+ Caption = 'Check'
+ TabOrder = 1
+ OnClick = btnCheckClick
+ end
+ object btnCheckAllFirst: TButton
+ AlignWithMargins = True
+ Left = 3
+ Top = 87
+ Width = 99
+ Height = 25
+ Margins.Top = 0
+ Align = alTop
+ Caption = 'CheckAll (First)'
+ TabOrder = 2
+ OnClick = btnCheckAllFirstClick
+ end
+ object btnCheckAll: TButton
+ AlignWithMargins = True
+ Left = 3
+ Top = 59
+ Width = 99
+ Height = 25
+ Margins.Top = 0
+ Align = alTop
+ Caption = 'CheckAll'
+ TabOrder = 3
+ OnClick = btnCheckAllClick
+ end
+ end
+ object Panel2: TPanel
+ Left = 105
+ Top = 0
+ Width = 545
+ Height = 117
+ Align = alClient
+ BevelOuter = bvNone
+ TabOrder = 1
+ object EditCodigo: TLabeledEdit
+ Left = 62
+ Top = 11
+ Width = 59
+ Height = 23
+ EditLabel.Width = 39
+ EditLabel.Height = 15
+ EditLabel.Caption = 'C'#243'digo'
+ LabelPosition = lpLeft
+ TabOrder = 0
+ Text = ''
+ end
+ object EditNome: TLabeledEdit
+ Left = 62
+ Top = 35
+ Width = 275
+ Height = 23
+ EditLabel.Width = 33
+ EditLabel.Height = 15
+ EditLabel.Caption = 'Nome'
+ LabelPosition = lpLeft
+ TabOrder = 1
+ Text = ''
+ end
+ object EditEmail: TLabeledEdit
+ Left = 62
+ Top = 59
+ Width = 467
+ Height = 23
+ EditLabel.Width = 34
+ EditLabel.Height = 15
+ EditLabel.Caption = 'E-mail'
+ LabelPosition = lpLeft
+ TabOrder = 2
+ Text = ''
+ end
+ object EditFone: TLabeledEdit
+ Left = 62
+ Top = 83
+ Width = 99
+ Height = 23
+ EditLabel.Width = 35
+ EditLabel.Height = 15
+ EditLabel.Caption = 'Fone 1'
+ LabelPosition = lpLeft
+ TabOrder = 3
+ Text = ''
+ end
+ object EditFone2: TLabeledEdit
+ Left = 238
+ Top = 83
+ Width = 99
+ Height = 23
+ EditLabel.Width = 35
+ EditLabel.Height = 15
+ EditLabel.Caption = 'Fone 2'
+ LabelPosition = lpLeft
+ TabOrder = 4
+ Text = ''
+ end
+ object EditFone3: TLabeledEdit
+ Left = 430
+ Top = 83
+ Width = 99
+ Height = 23
+ EditLabel.Width = 35
+ EditLabel.Height = 15
+ EditLabel.Caption = 'Fone 3'
+ LabelPosition = lpLeft
+ TabOrder = 5
+ Text = ''
+ end
+ object EditDataNascimento: TLabeledEdit
+ Left = 448
+ Top = 35
+ Width = 81
+ Height = 23
+ EditLabel.Width = 91
+ EditLabel.Height = 15
+ EditLabel.Caption = 'Data Nascimento'
+ LabelPosition = lpLeft
+ TabOrder = 6
+ Text = ''
+ end
+ end
+end
diff --git a/samples/Values/Basic/UBasic.pas b/samples/Values/Basic/UBasic.pas
new file mode 100644
index 0000000..261543b
--- /dev/null
+++ b/samples/Values/Basic/UBasic.pas
@@ -0,0 +1,130 @@
+unit UBasic;
+
+interface
+
+uses
+ DataValidator,
+ Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
+ Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls, Vcl.Mask;
+
+type
+ TForm2 = class(TForm)
+ Panel1: TPanel;
+ btnLimpar: TButton;
+ btnCheck: TButton;
+ Panel2: TPanel;
+ EditCodigo: TLabeledEdit;
+ EditNome: TLabeledEdit;
+ EditEmail: TLabeledEdit;
+ EditFone: TLabeledEdit;
+ EditFone2: TLabeledEdit;
+ EditFone3: TLabeledEdit;
+ EditDataNascimento: TLabeledEdit;
+ btnCheckAllFirst: TButton;
+ btnCheckAll: TButton;
+ procedure btnLimparClick(Sender: TObject);
+ procedure btnCheckClick(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ procedure btnCheckAllClick(Sender: TObject);
+ procedure btnCheckAllFirstClick(Sender: TObject);
+ private
+ { Private declarations }
+ function Validation: IDataValidatorValueResult;
+ procedure ValidationResult(const AResult: IDataValidatorResult);
+ public
+ { Public declarations }
+ end;
+
+var
+ Form2: TForm2;
+
+implementation
+
+{$R *.dfm}
+
+procedure TForm2.btnLimparClick(Sender: TObject);
+var
+ I : Integer;
+begin
+ for I := 0 to Pred(Self.ComponentCount) do
+ if (Self.Components[i] is TLabeledEdit) then
+ (Self.Components[i] as TLabeledEdit).Clear;
+end;
+
+procedure TForm2.btnCheckClick(Sender: TObject);
+var
+ LValidatorResult: IDataValidatorResult;
+begin
+ LValidatorResult := Validation.Check;
+ ValidationResult(LValidatorResult);
+end;
+
+procedure TForm2.btnCheckAllClick(Sender: TObject);
+var
+ LValidatorResult: IDataValidatorResult;
+begin
+ LValidatorResult := Validation.CheckAll();
+ ValidationResult(LValidatorResult);
+end;
+
+procedure TForm2.btnCheckAllFirstClick(Sender: TObject);
+var
+ LValidatorResult: IDataValidatorResult;
+begin
+ LValidatorResult := Validation.CheckAll(TDataValidatorCheckAll.tcFirst);
+ ValidationResult(LValidatorResult);
+end;
+
+procedure TForm2.ValidationResult(const AResult: IDataValidatorResult);
+begin
+ if AResult.OK then
+ ShowMessage('Tudo certo!')
+ else
+ begin
+ ShowMessage('Problema na validao: ' + sLineBreak + sLineBreak + AResult.Informations.Message);
+ AResult.Informations.GetItem(0).OnExecute;
+ end;
+end;
+
+function TForm2.Validation: IDataValidatorValueResult;
+begin
+ Result :=
+ TDataValidator.Values
+ .Validate(EditCodigo.Text, 'Cdigo').Execute(EditCodigo.SetFocus)
+ .Trim
+ .&Not.IsEmpty.WithMessage('O campo ${name} no pode ser vazio!')
+ .IsInteger.WithMessage('Informe somente nmeros no campo ${name}!')
+ .IsGreaterThan(0).WithMessage('Informe um ${name} maior que zero!')
+ .&End
+
+ .Validate(EditNome.Text, 'Nome').Execute(EditNome.SetFocus)
+ .Trim
+ .&Not.IsEmpty.WithMessage('O campo ${name} no pode ser vazio!')
+ .&Not.IsInteger.WithMessage('O campo ${name} no pode conter nmeros!')
+ .IsLength(3, 0).WithMessage('Informe um ${name} maior que 3 caracteres!')
+ .&End
+
+ .Validate(EditDataNascimento.Text, 'Data Nascimento').Execute(EditDataNascimento.SetFocus)
+ .Trim
+ .&Not.IsEmpty.WithMessage('O campo ${name} no pode ser vazio!')
+ .IsDate.WithMessage('A ${name}(${value}) informada invlida!')
+ .&Not.IsDateGreaterThan(Now).WithMessage('A ${name}(${value}) no pode ser maior que a data atual!')
+ .&End
+
+ .Validate(EditEmail.Text, 'E-mail').Execute(EditEmail.SetFocus)
+ .IsOptional // No obrigatrio, mas se tiver valor deve validar
+ .IsEmail.WithMessage('O ${name}(${value}) informado invlido!')
+ .&End
+
+ .Validate([EditFone.Text, EditFone2.Text, EditFone3.Text], 'Fone').Execute(EditFone.SetFocus)
+ .IsOptional
+ .IsPhoneNumber(TDataValidatorLocaleLanguage.tl_pt_BR).WithMessage('O ${name}(${value}) informado no vlido!')
+ .&End
+end;
+
+procedure TForm2.FormCreate(Sender: TObject);
+begin
+ ReportMemoryLeaksOnShutdown := True;
+end;
+
+end.
diff --git a/samples/Values/Sanitize/Basic.delphilsp.json b/samples/Values/Sanitize/Basic.delphilsp.json
new file mode 100644
index 0000000..858c367
--- /dev/null
+++ b/samples/Values/Sanitize/Basic.delphilsp.json
@@ -0,0 +1 @@
+{ "settings": { "project": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/samples/Values/Schema/Basic.dpr", "dllname": "dcc32280.dll", "dccOptions": "-$O- -$W+ -$R+ -$Q+ --no-config -Q -TX.exe -AGenerics.Collections=System.Generics.Collections;Generics.Defaults=System.Generics.Defaults;WinTypes=Winapi.Windows;WinProcs=Winapi.Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -DDEBUG;;FRAMEWORK_VCL -E.\\Win32\\Debug -I\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\debug\";\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\release\";C:\\Users\\danil\\Documents\\Embarcadero\\Studio\\22.0\\Imports;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\Imports\";C:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\include\" -LEC:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Bpl -LNC:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp -NU.\\Win32\\Debug -NSWinapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell; -O\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\release\";C:\\Users\\danil\\Documents\\Embarcadero\\Studio\\22.0\\Imports;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\Imports\";C:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\include\" -R\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\release\";C:\\Users\\danil\\Documents\\Embarcadero\\Studio\\22.0\\Imports;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\Imports\";C:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\include\" -U\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\debug\";\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\release\";C:\\Users\\danil\\Documents\\Embarcadero\\Studio\\22.0\\Imports;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\Imports\";C:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\include\" -V -VN -NBC:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp -NHC:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\hpp\\Win32 -NO.\\Win32\\Debug -LU" , "projectFiles":[ { "name": "UBasic", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/samples/Values/Schema/UBasic.pas" }, { "name": "DataValidator.Context.Intf", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Context.Intf.pas" }, { "name": "DataValidator.Context", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Context.pas" }, { "name": "DataValidator.Information.Intf", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Information.Intf.pas" }, { "name": "DataValidator.Information", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Information.pas" }, { "name": "DataValidator.Intf", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Intf.pas" }, { "name": "DataValidator.ItemBase.Intf", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.ItemBase.Intf.pas" }, { "name": "DataValidator.ItemBase", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.ItemBase.pas" }, { "name": "DataValidator.ItemBase.Sanitizer", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.ItemBase.Sanitizer.pas" }, { "name": "DataValidator.JSON.Base", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.JSON.Base.pas" }, { "name": "DataValidator.JSON.Context.Intf", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.JSON.Context.Intf.pas" }, { "name": "DataValidator.JSON.Context", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.JSON.Context.pas" }, { "name": "DataValidator.JSON", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.JSON.pas" }, { "name": "DataValidator", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.pas" }, { "name": "DataValidator.Result.Intf", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Result.Intf.pas" }, { "name": "DataValidator.Result", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Result.pas" }, { "name": "DataValidator.Schema.Base", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Schema.Base.pas" }, { "name": "DataValidator.Schema", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Schema.pas" }, { "name": "DataValidator.Types", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Types.pas" }, { "name": "DataValidator.Value.Base", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Value.Base.pas" }, { "name": "DataValidator.Value", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Value.pas" }, { "name": "Sanitizer.Base64.Decode", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.Base64.Decode.pas" }, { "name": "Sanitizer.Base64.Encode", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.Base64.Encode.pas" }, { "name": "Sanitizer.Custom", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.Custom.pas" }, { "name": "Sanitizer.HTML.Decode", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.HTML.Decode.pas" }, { "name": "Sanitizer.HTML.Encode", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.HTML.Encode.pas" }, { "name": "Sanitizer.NormalizeEmail", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.NormalizeEmail.pas" }, { "name": "Sanitizer.OnlyNumbers", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.OnlyNumbers.pas" }, { "name": "Sanitizer.RemoveAccents", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.RemoveAccents.pas" }, { "name": "Sanitizer.Replace", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.Replace.pas" }, { "name": "Sanitizer.ToDate", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.ToDate.pas" }, { "name": "Sanitizer.ToDateTime", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.ToDateTime.pas" }, { "name": "Sanitizer.ToInteger", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.ToInteger.pas" }, { "name": "Sanitizer.ToLowerCase", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.ToLowerCase.pas" }, { "name": "Sanitizer.ToMD5", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.ToMD5.pas" }, { "name": "Sanitizer.ToNumeric", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.ToNumeric.pas" }, { "name": "Sanitizer.ToTime", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.ToTime.pas" }, { "name": "Sanitizer.ToUpperCase", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.ToUpperCase.pas" }, { "name": "Sanitizer.Trim", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.Trim.pas" }, { "name": "Sanitizer.TrimLeft", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.TrimLeft.pas" }, { "name": "Sanitizer.TrimRight", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.TrimRight.pas" }, { "name": "Sanitizer.URL.Decode", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.URL.Decode.pas" }, { "name": "Sanitizer.URL.Encode", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.URL.Encode.pas" }, { "name": "Validator.Contains", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.Contains.pas" }, { "name": "Validator.Custom", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.Custom.pas" }, { "name": "Validator.EndsWith", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.EndsWith.pas" }, { "name": "Validator.IsAlpha", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsAlpha.pas" }, { "name": "Validator.IsAlphanumeric", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsAlphanumeric.pas" }, { "name": "Validator.IsAscii", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsAscii.pas" }, { "name": "Validator.IsBase32", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsBase32.pas" }, { "name": "Validator.IsBase58", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsBase58.pas" }, { "name": "Validator.IsBase64", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsBase64.pas" }, { "name": "Validator.IsBetween", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsBetween.pas" }, { "name": "Validator.IsBoolean", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsBoolean.pas" }, { "name": "Validator.IsBTCAddress", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsBTCAddress.pas" }, { "name": "Validator.IsCNPJ", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsCNPJ.pas" }, { "name": "Validator.IsCPF", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsCPF.pas" }, { "name": "Validator.IsCPFCNPJ", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsCPFCNPJ.pas" }, { "name": "Validator.IsDate", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsDate.pas" }, { "name": "Validator.IsDateBetween", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsDateBetween.pas" }, { "name": "Validator.IsDateEquals", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsDateEquals.pas" }, { "name": "Validator.IsDateGreaterThan", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsDateGreaterThan.pas" }, { "name": "Validator.IsDateLessThan", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsDateLessThan.pas" }, { "name": "Validator.IsDateTime", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsDateTime.pas" }, { "name": "Validator.IsEmail", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsEmail.pas" }, { "name": "Validator.IsEmpty", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsEmpty.pas" }, { "name": "Validator.IsEquals", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsEquals.pas" }, { "name": "Validator.IsEthereumAddress", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsEthereumAddress.pas" }, { "name": "Validator.IsGreaterThan", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsGreaterThan.pas" }, { "name": "Validator.IsGTIN", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsGTIN.pas" }, { "name": "Validator.IsHexadecimal", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsHexadecimal.pas" }, { "name": "Validator.IsHexColor", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsHexColor.pas" }, { "name": "Validator.IsInteger", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsInteger.pas" }, { "name": "Validator.IsIP", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsIP.pas" }, { "name": "Validator.IsISO8601", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsISO8601.pas" }, { "name": "Validator.IsJSON", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsJSON.pas" }, { "name": "Validator.IsJWT", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsJWT.pas" }, { "name": "Validator.IsLatLong", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsLatLong.pas" }, { "name": "Validator.IsLength", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsLength.pas" }, { "name": "Validator.IsLessThan", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsLessThan.pas" }, { "name": "Validator.IsLocale", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsLocale.pas" }, { "name": "Validator.IsLowercase", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsLowercase.pas" }, { "name": "Validator.IsMACAddress", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsMACAddress.pas" }, { "name": "Validator.IsMagnetURI", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsMagnetURI.pas" }, { "name": "Validator.IsMD5", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsMD5.pas" }, { "name": "Validator.IsMimeType", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsMimeType.pas" }, { "name": "Validator.IsMongoId", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsMongoId.pas" }, { "name": "Validator.IsNegative", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsNegative.pas" }, { "name": "Validator.IsNumeric", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsNumeric.pas" }, { "name": "Validator.IsOctal", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsOctal.pas" }, { "name": "Validator.IsOptional", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsOptional.pas" }, { "name": "Validator.IsPassportNumber", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsPassportNumber.pas" }, { "name": "Validator.IsPhoneNumber", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsPhoneNumber.pas" }, { "name": "Validator.IsPort", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsPort.pas" }, { "name": "Validator.IsPositive", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsPositive.pas" }, { "name": "Validator.IsPostalCode", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsPostalCode.pas" }, { "name": "Validator.IsRGBColor", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsRGBColor.pas" }, { "name": "Validator.IsSSN", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsSSN.pas" }, { "name": "Validator.IsTime", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsTime.pas" }, { "name": "Validator.IsTimeBetween", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsTimeBetween.pas" }, { "name": "Validator.IsTimeEquals", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsTimeEquals.pas" }, { "name": "Validator.IsTimeGreaterThan", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsTimeGreaterThan.pas" }, { "name": "Validator.IsTimeLessThan", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsTimeLessThan.pas" }, { "name": "Validator.IsUppercase", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsUppercase.pas" }, { "name": "Validator.IsURL", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsURL.pas" }, { "name": "Validator.IsUUID", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsUUID.pas" }, { "name": "Validator.IsZero", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsZero.pas" }, { "name": "Validator.JSON.Key.IsOptional", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.JSON.Key.IsOptional.pas" }, { "name": "Validator.JSON.Key.IsRequired", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.JSON.Key.IsRequired.pas" }, { "name": "Validator.JSON.Value.Custom", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.JSON.Value.Custom.pas" }, { "name": "Validator.JSON.Value.IsNull", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.JSON.Value.IsNull.pas" }, { "name": "Validator.JSON.Value.MaxItems", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.JSON.Value.MaxItems.pas" }, { "name": "Validator.JSON.Value.MinItems", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.JSON.Value.MinItems.pas" }, { "name": "Validator.Regex.IsMatch", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.Regex.IsMatch.pas" }, { "name": "Validator.StartsWith", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.StartsWith.pas" } ] , "includeDCUsInUsesCompletion": true, "browsingPaths": [ "file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/OCX/Servers","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/SOURCE/VCL","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/rtl/common","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/SOURCE/RTL/SYS","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/rtl/win","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/rtl/win/winrt","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/ToolsAPI","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/SOURCE/IBX","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Internet","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/SOURCE/PROPERTY%20EDITORS","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/soap","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/SOURCE/XML","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Indy10/Core","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Indy10/System","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Indy10/Protocols","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/fmx","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/databinding/components","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/databinding/engine","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/databinding/graph","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/ado","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/cloud","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/datasnap","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/dbx","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/dsnap","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/vclctrls","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/datasnap/connectors","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/datasnap/proxygen","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DataExplorer","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/DUnitWizard/Source/Common","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/DUnitWizard/Source/Common/dunit","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/DUnitWizard/Source/DelphiExperts/Common","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/DUnitWizard/Source/DelphiExperts/DUnitProject","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/DUnitWizard/Source/DelphiExperts/DUnitProject/dunit","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/src","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/tests","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Experts","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/indy/abstraction","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/indy/implementation","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/indyimpl","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Property%20Editors/Indy10","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/soap/wsdlimporter","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Visualizers","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/XMLReporting","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/XPGen","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/rest","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/firedac","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/tethering","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnitX","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/ems","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/rtl/net","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/FlatBox2D" ] } }
\ No newline at end of file
diff --git a/samples/Values/Sanitize/Sanitize.delphilsp.json b/samples/Values/Sanitize/Sanitize.delphilsp.json
new file mode 100644
index 0000000..008eb2d
--- /dev/null
+++ b/samples/Values/Sanitize/Sanitize.delphilsp.json
@@ -0,0 +1 @@
+{ "settings": { "project": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/samples/Values/Sanitize/Sanitize.dpr", "dllname": "dcc32280.dll", "dccOptions": "-$O- -$W+ -$R+ -$Q+ --no-config -Q -TX.exe -AGenerics.Collections=System.Generics.Collections;Generics.Defaults=System.Generics.Defaults;WinTypes=Winapi.Windows;WinProcs=Winapi.Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -DDEBUG;;FRAMEWORK_VCL -E.\\Win32\\Debug -I\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\debug\";..\\..\\..\\src\\core;..\\..\\..\\src\\sanitializators;..\\..\\..\\src\\validators;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\release\";C:\\Users\\danil\\Documents\\Embarcadero\\Studio\\22.0\\Imports;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\Imports\";C:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\include\" -LEC:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Bpl -LNC:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp -NU.\\Win32\\Debug -NSWinapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell; -O..\\..\\..\\src\\core;..\\..\\..\\src\\sanitializators;..\\..\\..\\src\\validators;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\release\";C:\\Users\\danil\\Documents\\Embarcadero\\Studio\\22.0\\Imports;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\Imports\";C:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\include\" -R..\\..\\..\\src\\core;..\\..\\..\\src\\sanitializators;..\\..\\..\\src\\validators;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\release\";C:\\Users\\danil\\Documents\\Embarcadero\\Studio\\22.0\\Imports;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\Imports\";C:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\include\" -U\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\debug\";..\\..\\..\\src\\core;..\\..\\..\\src\\sanitializators;..\\..\\..\\src\\validators;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\release\";C:\\Users\\danil\\Documents\\Embarcadero\\Studio\\22.0\\Imports;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\Imports\";C:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\include\" -V -VN -NBC:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp -NHC:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\hpp\\Win32 -NO.\\Win32\\Debug -LU" , "projectFiles":[ { "name": "USanitize", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/samples/Values/Sanitize/USanitize.pas" } ] , "includeDCUsInUsesCompletion": true, "browsingPaths": [ "file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/OCX/Servers","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/SOURCE/VCL","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/rtl/common","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/SOURCE/RTL/SYS","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/rtl/win","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/rtl/win/winrt","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/ToolsAPI","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/SOURCE/IBX","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Internet","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/SOURCE/PROPERTY%20EDITORS","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/soap","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/SOURCE/XML","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Indy10/Core","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Indy10/System","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Indy10/Protocols","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/fmx","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/databinding/components","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/databinding/engine","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/databinding/graph","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/ado","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/cloud","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/datasnap","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/dbx","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/dsnap","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/vclctrls","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/datasnap/connectors","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/datasnap/proxygen","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DataExplorer","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/DUnitWizard/Source/Common","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/DUnitWizard/Source/Common/dunit","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/DUnitWizard/Source/DelphiExperts/Common","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/DUnitWizard/Source/DelphiExperts/DUnitProject","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/DUnitWizard/Source/DelphiExperts/DUnitProject/dunit","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/src","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/tests","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Experts","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/indy/abstraction","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/indy/implementation","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/indyimpl","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Property%20Editors/Indy10","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/soap/wsdlimporter","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Visualizers","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/XMLReporting","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/XPGen","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/rest","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/firedac","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/tethering","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnitX","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/ems","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/rtl/net","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/FlatBox2D" ] } }
\ No newline at end of file
diff --git a/samples/Values/Sanitize/Sanitize.dpr b/samples/Values/Sanitize/Sanitize.dpr
new file mode 100644
index 0000000..1108755
--- /dev/null
+++ b/samples/Values/Sanitize/Sanitize.dpr
@@ -0,0 +1,14 @@
+program Sanitize;
+
+uses
+ Vcl.Forms,
+ USanitize in 'USanitize.pas' {Form2};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.MainFormOnTaskbar := True;
+ Application.CreateForm(TForm2, Form2);
+ Application.Run;
+end.
diff --git a/samples/Model 3 - Sanitize/Model3.dproj b/samples/Values/Sanitize/Sanitize.dproj
similarity index 87%
rename from samples/Model 3 - Sanitize/Model3.dproj
rename to samples/Values/Sanitize/Sanitize.dproj
index 46acc22..358c775 100644
--- a/samples/Model 3 - Sanitize/Model3.dproj
+++ b/samples/Values/Sanitize/Sanitize.dproj
@@ -1,14 +1,14 @@
- {42A50DE4-A3FF-4EF7-8D94-74F9DDED2D95}
- 19.2
+ {003881DF-B1A2-46DF-906B-76CFCE2C63D1}
+ 19.4
VCL
True
Debug
Win32
1
Application
- Model3.dpr
+ Sanitize.dpr
true
@@ -57,19 +57,23 @@
$(BDS)\bin\delphi_PROJECTICON.ico
$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png
$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png
- Model3
+ Sanitize
+ ..\..\..\src\core;..\..\..\src\sanitializators;..\..\..\src\validators;$(DCC_UnitSearchPath)
+ 1046
+ CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=
- DBXSqliteDriver;RESTComponents;fmxase;DBXDb2Driver;DBXInterBaseDriver;vclactnband;vclFireDAC;bindcompvclsmp;emsclientfiredac;tethering;svnui;DataSnapFireDAC;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;svn;DBXOracleDriver;inetdb;FmxTeeUI;emsedge;fmx;FireDACIBDriver;fmxdae;vcledge;vclib;FireDACDBXDriver;dbexpress;IndyCore;vclx;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;vclie;bindengine;DBXMySQLDriver;CloudService;FireDACOracleDriver;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;vcl;IndyIPServer;DBXSybaseASEDriver;IndySystem;FireDACDb2Driver;bindcompvclwinx;dsnapcon;madExcept_;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;madBasic_;TeeDB;FireDAC;emshosting;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;ibxpress;Tee;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;FireDACDSDriver;rtl;emsserverresource;DbxClientDriver;ibxbindings;DBXSybaseASADriver;madDisAsm_;CustomIPTransport;vcldsnap;bindcomp;appanalytics;DBXInformixDriver;IndyIPClient;bindcompvcl;TeeUI;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;inetdbxpress;FireDACMongoDBDriver;DataSnapServerMidas;$(DCC_UsePackage)
+ vclwinx;DataSnapServer;fmx;emshosting;vclie;DbxCommonDriver;bindengine;IndyIPCommon;VCLRESTComponents;DBXMSSQLDriver;FireDACCommonODBC;emsclient;FireDACCommonDriver;appanalytics;IndyProtocols;vclx;IndyIPClient;dbxcds;vcledge;bindcompvclwinx;FmxTeeUI;emsedge;bindcompfmx;DBXFirebirdDriver;inetdb;ibmonitor;FireDACSqliteDriver;DbxClientDriver;FireDACASADriver;Tee;soapmidas;vclactnband;TeeUI;fmxFireDAC;dbexpress;FireDACInfxDriver;DBXMySQLDriver;VclSmp;inet;DataSnapCommon;vcltouch;fmxase;DBXOdbcDriver;dbrtl;FireDACDBXDriver;FireDACOracleDriver;fmxdae;TeeDB;FireDACMSAccDriver;CustomIPTransport;FireDACMSSQLDriver;DataSnapIndy10ServerTransport;DataSnapConnectors;vcldsnap;DBXInterBaseDriver;FireDACMongoDBDriver;IndySystem;FireDACTDataDriver;vcldb;ibxbindings;vclFireDAC;bindcomp;FireDACCommon;DataSnapServerMidas;FireDACODBCDriver;emsserverresource;IndyCore;RESTBackendComponents;bindcompdbx;rtl;FireDACMySQLDriver;FireDACADSDriver;RESTComponents;DBXSqliteDriver;vcl;IndyIPServer;dsnapxml;dsnapcon;DataSnapClient;DataSnapProviderClient;adortl;DBXSybaseASEDriver;DBXDb2Driver;vclimg;DataSnapFireDAC;emsclientfiredac;FireDACPgDriver;FireDAC;FireDACDSDriver;inetdbxpress;xmlrtl;tethering;ibxpress;bindcompvcl;dsnap;CloudService;DBXSybaseASADriver;DBXOracleDriver;FireDACDb2Driver;DBXInformixDriver;vclib;fmxobj;bindcompvclsmp;DataSnapNativeClient;FMXTee;DatasnapConnectorsFreePascal;soaprtl;soapserver;FireDACIBDriver;$(DCC_UsePackage)
Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
Debug
true
CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=
1033
$(BDS)\bin\default_app.manifest
+ true
- DBXSqliteDriver;RESTComponents;fmxase;DBXDb2Driver;DBXInterBaseDriver;vclactnband;vclFireDAC;bindcompvclsmp;emsclientfiredac;tethering;DataSnapFireDAC;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;DBXOracleDriver;inetdb;FmxTeeUI;emsedge;fmx;FireDACIBDriver;fmxdae;vcledge;vclib;FireDACDBXDriver;dbexpress;IndyCore;vclx;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;vclie;bindengine;DBXMySQLDriver;CloudService;FireDACOracleDriver;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;vcl;IndyIPServer;DBXSybaseASEDriver;IndySystem;FireDACDb2Driver;bindcompvclwinx;dsnapcon;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;TeeDB;FireDAC;emshosting;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;ibxpress;Tee;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;FireDACDSDriver;rtl;emsserverresource;DbxClientDriver;ibxbindings;DBXSybaseASADriver;CustomIPTransport;vcldsnap;bindcomp;appanalytics;DBXInformixDriver;IndyIPClient;bindcompvcl;TeeUI;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;inetdbxpress;FireDACMongoDBDriver;DataSnapServerMidas;$(DCC_UsePackage)
+ vclwinx;DataSnapServer;fmx;emshosting;vclie;DbxCommonDriver;bindengine;IndyIPCommon;VCLRESTComponents;DBXMSSQLDriver;FireDACCommonODBC;emsclient;FireDACCommonDriver;appanalytics;IndyProtocols;vclx;IndyIPClient;dbxcds;vcledge;bindcompvclwinx;FmxTeeUI;emsedge;bindcompfmx;DBXFirebirdDriver;inetdb;ibmonitor;FireDACSqliteDriver;DbxClientDriver;FireDACASADriver;Tee;soapmidas;vclactnband;TeeUI;fmxFireDAC;dbexpress;FireDACInfxDriver;DBXMySQLDriver;VclSmp;inet;DataSnapCommon;vcltouch;fmxase;DBXOdbcDriver;dbrtl;FireDACDBXDriver;FireDACOracleDriver;fmxdae;TeeDB;FireDACMSAccDriver;CustomIPTransport;FireDACMSSQLDriver;DataSnapIndy10ServerTransport;DataSnapConnectors;vcldsnap;DBXInterBaseDriver;FireDACMongoDBDriver;IndySystem;FireDACTDataDriver;vcldb;ibxbindings;vclFireDAC;bindcomp;FireDACCommon;DataSnapServerMidas;FireDACODBCDriver;emsserverresource;IndyCore;RESTBackendComponents;bindcompdbx;rtl;FireDACMySQLDriver;FireDACADSDriver;RESTComponents;DBXSqliteDriver;vcl;IndyIPServer;dsnapxml;dsnapcon;DataSnapClient;DataSnapProviderClient;adortl;DBXSybaseASEDriver;DBXDb2Driver;vclimg;DataSnapFireDAC;emsclientfiredac;FireDACPgDriver;FireDAC;FireDACDSDriver;inetdbxpress;xmlrtl;tethering;ibxpress;bindcompvcl;dsnap;CloudService;DBXSybaseASADriver;DBXOracleDriver;FireDACDb2Driver;DBXInformixDriver;vclib;fmxobj;bindcompvclsmp;DataSnapNativeClient;FMXTee;DatasnapConnectorsFreePascal;soaprtl;soapserver;FireDACIBDriver;$(DCC_UsePackage)
DEBUG;$(DCC_Define)
@@ -78,12 +82,13 @@
true
true
true
+ true
+ true
false
true
PerMonitorV2
- ..\..\src\core;..\..\src\sanitializators;..\..\src\validators;$(DCC_UnitSearchPath)
true
1033
@@ -101,14 +106,10 @@
MainSource
-
-
+
+
dfm
-
- Cfg_2
- Base
-
Base
@@ -116,6 +117,10 @@
Cfg_1
Base
+
+ Cfg_2
+ Base
+
Delphi.Personality.12
@@ -123,19 +128,19 @@
- Model3.dpr
+ Sanitize.dpr
- Embarcadero C++Builder Office 2000 Servers Package
- Embarcadero C++Builder Office XP Servers Package
- Microsoft Office 2000 Sample Automation Server Wrapper Components
- Microsoft Office XP Sample Automation Server Wrapper Components
+ Embarcadero C++Builder Office 2000 Servers Package
+ Embarcadero C++Builder Office XP Servers Package
+ Microsoft Office 2000 Sample Automation Server Wrapper Components
+ Microsoft Office XP Sample Automation Server Wrapper Components
-
+
- Model3.exe
+ Sanitize.exe
true
@@ -151,14 +156,14 @@
0
-
+
classes
- 1
+ 64
classes
- 1
+ 64
@@ -452,6 +457,11 @@
1
.framework
+
+ Contents\MacOS
+ 1
+ .framework
+
0
@@ -479,6 +489,11 @@
1
.dylib
+
+ Contents\MacOS
+ 1
+ .dylib
+
0
.dll;.bpl
@@ -507,6 +522,11 @@
1
.dylib
+
+ Contents\MacOS
+ 1
+ .dylib
+
0
.bpl
@@ -536,6 +556,10 @@
Contents\Resources\StartUp\
0
+
+ Contents\Resources\StartUp\
+ 0
+
0
@@ -801,6 +825,10 @@
..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
1
+
+ ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
+ 1
+
@@ -811,6 +839,10 @@
..\
1
+
+ ..\
+ 1
+
@@ -821,6 +853,10 @@
Contents
1
+
+ Contents
+ 1
+
@@ -831,6 +867,10 @@
Contents\Resources
1
+
+ Contents\Resources
+ 1
+
@@ -861,6 +901,10 @@
Contents\MacOS
1
+
+ Contents\MacOS
+ 1
+
0
@@ -899,16 +943,17 @@
1
-
-
+
+
+
+
-
-
-
-
+
+
+
True
diff --git a/samples/Values/Sanitize/Schema.delphilsp.json b/samples/Values/Sanitize/Schema.delphilsp.json
new file mode 100644
index 0000000..26c37ec
--- /dev/null
+++ b/samples/Values/Sanitize/Schema.delphilsp.json
@@ -0,0 +1 @@
+{ "settings": { "project": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/samples/Values/Sanitize/Schema.dpr", "dllname": "dcc32280.dll", "dccOptions": "-$O- -$W+ -$R+ -$Q+ --no-config -Q -TX.exe -AGenerics.Collections=System.Generics.Collections;Generics.Defaults=System.Generics.Defaults;WinTypes=Winapi.Windows;WinProcs=Winapi.Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -DDEBUG;;FRAMEWORK_VCL -E.\\Win32\\Debug -I\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\debug\";\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\release\";C:\\Users\\danil\\Documents\\Embarcadero\\Studio\\22.0\\Imports;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\Imports\";C:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\include\" -LEC:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Bpl -LNC:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp -NU.\\Win32\\Debug -NSWinapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell; -O\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\release\";C:\\Users\\danil\\Documents\\Embarcadero\\Studio\\22.0\\Imports;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\Imports\";C:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\include\" -R\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\release\";C:\\Users\\danil\\Documents\\Embarcadero\\Studio\\22.0\\Imports;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\Imports\";C:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\include\" -U\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\debug\";\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\release\";C:\\Users\\danil\\Documents\\Embarcadero\\Studio\\22.0\\Imports;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\Imports\";C:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\include\" -V -VN -NBC:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp -NHC:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\hpp\\Win32 -NO.\\Win32\\Debug -LU" , "projectFiles":[ { "name": "USchema", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/samples/Values/Sanitize/USchema.pas" }, { "name": "DataValidator.Context.Intf", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Context.Intf.pas" }, { "name": "DataValidator.Context", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Context.pas" }, { "name": "DataValidator.Information.Intf", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Information.Intf.pas" }, { "name": "DataValidator.Information", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Information.pas" }, { "name": "DataValidator.Intf", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Intf.pas" }, { "name": "DataValidator.ItemBase.Intf", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.ItemBase.Intf.pas" }, { "name": "DataValidator.ItemBase", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.ItemBase.pas" }, { "name": "DataValidator.ItemBase.Sanitizer", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.ItemBase.Sanitizer.pas" }, { "name": "DataValidator.JSON.Base", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.JSON.Base.pas" }, { "name": "DataValidator.JSON.Context.Intf", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.JSON.Context.Intf.pas" }, { "name": "DataValidator.JSON.Context", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.JSON.Context.pas" }, { "name": "DataValidator.JSON", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.JSON.pas" }, { "name": "DataValidator", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.pas" }, { "name": "DataValidator.Result.Intf", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Result.Intf.pas" }, { "name": "DataValidator.Result", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Result.pas" }, { "name": "DataValidator.Schema.Base", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Schema.Base.pas" }, { "name": "DataValidator.Schema", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Schema.pas" }, { "name": "DataValidator.Types", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Types.pas" }, { "name": "DataValidator.Value.Base", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Value.Base.pas" }, { "name": "DataValidator.Value", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Value.pas" }, { "name": "Sanitizer.Base64.Decode", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.Base64.Decode.pas" }, { "name": "Sanitizer.Base64.Encode", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.Base64.Encode.pas" }, { "name": "Sanitizer.Custom", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.Custom.pas" }, { "name": "Sanitizer.HTML.Decode", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.HTML.Decode.pas" }, { "name": "Sanitizer.HTML.Encode", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.HTML.Encode.pas" }, { "name": "Sanitizer.NormalizeEmail", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.NormalizeEmail.pas" }, { "name": "Sanitizer.OnlyNumbers", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.OnlyNumbers.pas" }, { "name": "Sanitizer.RemoveAccents", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.RemoveAccents.pas" }, { "name": "Sanitizer.Replace", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.Replace.pas" }, { "name": "Sanitizer.ToDate", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.ToDate.pas" }, { "name": "Sanitizer.ToDateTime", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.ToDateTime.pas" }, { "name": "Sanitizer.ToInteger", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.ToInteger.pas" }, { "name": "Sanitizer.ToLowerCase", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.ToLowerCase.pas" }, { "name": "Sanitizer.ToMD5", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.ToMD5.pas" }, { "name": "Sanitizer.ToNumeric", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.ToNumeric.pas" }, { "name": "Sanitizer.ToTime", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.ToTime.pas" }, { "name": "Sanitizer.ToUpperCase", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.ToUpperCase.pas" }, { "name": "Sanitizer.Trim", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.Trim.pas" }, { "name": "Sanitizer.TrimLeft", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.TrimLeft.pas" }, { "name": "Sanitizer.TrimRight", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.TrimRight.pas" }, { "name": "Sanitizer.URL.Decode", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.URL.Decode.pas" }, { "name": "Sanitizer.URL.Encode", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.URL.Encode.pas" }, { "name": "Validator.Contains", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.Contains.pas" }, { "name": "Validator.Custom", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.Custom.pas" }, { "name": "Validator.EndsWith", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.EndsWith.pas" }, { "name": "Validator.IsAlpha", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsAlpha.pas" }, { "name": "Validator.IsAlphanumeric", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsAlphanumeric.pas" }, { "name": "Validator.IsAscii", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsAscii.pas" }, { "name": "Validator.IsBase32", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsBase32.pas" }, { "name": "Validator.IsBase58", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsBase58.pas" }, { "name": "Validator.IsBase64", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsBase64.pas" }, { "name": "Validator.IsBetween", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsBetween.pas" }, { "name": "Validator.IsBoolean", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsBoolean.pas" }, { "name": "Validator.IsBTCAddress", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsBTCAddress.pas" }, { "name": "Validator.IsCNPJ", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsCNPJ.pas" }, { "name": "Validator.IsCPF", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsCPF.pas" }, { "name": "Validator.IsCPFCNPJ", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsCPFCNPJ.pas" }, { "name": "Validator.IsDate", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsDate.pas" }, { "name": "Validator.IsDateBetween", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsDateBetween.pas" }, { "name": "Validator.IsDateEquals", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsDateEquals.pas" }, { "name": "Validator.IsDateGreaterThan", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsDateGreaterThan.pas" }, { "name": "Validator.IsDateLessThan", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsDateLessThan.pas" }, { "name": "Validator.IsDateTime", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsDateTime.pas" }, { "name": "Validator.IsEmail", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsEmail.pas" }, { "name": "Validator.IsEmpty", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsEmpty.pas" }, { "name": "Validator.IsEquals", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsEquals.pas" }, { "name": "Validator.IsEthereumAddress", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsEthereumAddress.pas" }, { "name": "Validator.IsGreaterThan", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsGreaterThan.pas" }, { "name": "Validator.IsGTIN", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsGTIN.pas" }, { "name": "Validator.IsHexadecimal", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsHexadecimal.pas" }, { "name": "Validator.IsHexColor", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsHexColor.pas" }, { "name": "Validator.IsInteger", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsInteger.pas" }, { "name": "Validator.IsIP", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsIP.pas" }, { "name": "Validator.IsISO8601", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsISO8601.pas" }, { "name": "Validator.IsJSON", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsJSON.pas" }, { "name": "Validator.IsJWT", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsJWT.pas" }, { "name": "Validator.IsLatLong", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsLatLong.pas" }, { "name": "Validator.IsLength", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsLength.pas" }, { "name": "Validator.IsLessThan", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsLessThan.pas" }, { "name": "Validator.IsLocale", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsLocale.pas" }, { "name": "Validator.IsLowercase", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsLowercase.pas" }, { "name": "Validator.IsMACAddress", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsMACAddress.pas" }, { "name": "Validator.IsMagnetURI", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsMagnetURI.pas" }, { "name": "Validator.IsMD5", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsMD5.pas" }, { "name": "Validator.IsMimeType", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsMimeType.pas" }, { "name": "Validator.IsMongoId", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsMongoId.pas" }, { "name": "Validator.IsNegative", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsNegative.pas" }, { "name": "Validator.IsNumeric", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsNumeric.pas" }, { "name": "Validator.IsOctal", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsOctal.pas" }, { "name": "Validator.IsOptional", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsOptional.pas" }, { "name": "Validator.IsPassportNumber", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsPassportNumber.pas" }, { "name": "Validator.IsPhoneNumber", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsPhoneNumber.pas" }, { "name": "Validator.IsPort", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsPort.pas" }, { "name": "Validator.IsPositive", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsPositive.pas" }, { "name": "Validator.IsPostalCode", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsPostalCode.pas" }, { "name": "Validator.IsRGBColor", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsRGBColor.pas" }, { "name": "Validator.IsSSN", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsSSN.pas" }, { "name": "Validator.IsTime", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsTime.pas" }, { "name": "Validator.IsTimeBetween", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsTimeBetween.pas" }, { "name": "Validator.IsTimeEquals", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsTimeEquals.pas" }, { "name": "Validator.IsTimeGreaterThan", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsTimeGreaterThan.pas" }, { "name": "Validator.IsTimeLessThan", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsTimeLessThan.pas" }, { "name": "Validator.IsUppercase", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsUppercase.pas" }, { "name": "Validator.IsURL", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsURL.pas" }, { "name": "Validator.IsUUID", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsUUID.pas" }, { "name": "Validator.IsZero", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsZero.pas" }, { "name": "Validator.JSON.Key.IsOptional", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.JSON.Key.IsOptional.pas" }, { "name": "Validator.JSON.Key.IsRequired", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.JSON.Key.IsRequired.pas" }, { "name": "Validator.JSON.Value.Custom", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.JSON.Value.Custom.pas" }, { "name": "Validator.JSON.Value.IsNull", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.JSON.Value.IsNull.pas" }, { "name": "Validator.JSON.Value.MaxItems", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.JSON.Value.MaxItems.pas" }, { "name": "Validator.JSON.Value.MinItems", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.JSON.Value.MinItems.pas" }, { "name": "Validator.Regex.IsMatch", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.Regex.IsMatch.pas" }, { "name": "Validator.StartsWith", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.StartsWith.pas" } ] , "includeDCUsInUsesCompletion": true, "browsingPaths": [ "file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/OCX/Servers","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/SOURCE/VCL","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/rtl/common","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/SOURCE/RTL/SYS","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/rtl/win","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/rtl/win/winrt","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/ToolsAPI","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/SOURCE/IBX","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Internet","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/SOURCE/PROPERTY%20EDITORS","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/soap","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/SOURCE/XML","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Indy10/Core","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Indy10/System","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Indy10/Protocols","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/fmx","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/databinding/components","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/databinding/engine","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/databinding/graph","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/ado","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/cloud","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/datasnap","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/dbx","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/dsnap","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/vclctrls","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/datasnap/connectors","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/datasnap/proxygen","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DataExplorer","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/DUnitWizard/Source/Common","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/DUnitWizard/Source/Common/dunit","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/DUnitWizard/Source/DelphiExperts/Common","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/DUnitWizard/Source/DelphiExperts/DUnitProject","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/DUnitWizard/Source/DelphiExperts/DUnitProject/dunit","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/src","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/tests","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Experts","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/indy/abstraction","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/indy/implementation","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/indyimpl","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Property%20Editors/Indy10","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/soap/wsdlimporter","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Visualizers","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/XMLReporting","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/XPGen","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/rest","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/firedac","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/tethering","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnitX","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/ems","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/rtl/net","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/FlatBox2D" ] } }
\ No newline at end of file
diff --git a/samples/Values/Sanitize/USanitize.dfm b/samples/Values/Sanitize/USanitize.dfm
new file mode 100644
index 0000000..aa9e80f
--- /dev/null
+++ b/samples/Values/Sanitize/USanitize.dfm
@@ -0,0 +1,92 @@
+object Form2: TForm2
+ Left = 0
+ Top = 0
+ BorderIcons = [biSystemMenu, biMinimize]
+ Caption = 'DataValidator - Sanitize'
+ ClientHeight = 297
+ ClientWidth = 650
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -12
+ Font.Name = 'Segoe UI'
+ Font.Style = []
+ OnCreate = FormCreate
+ TextHeight = 15
+ object Panel1: TPanel
+ Left = 0
+ Top = 0
+ Width = 105
+ Height = 297
+ Align = alLeft
+ BevelOuter = bvNone
+ Color = 2565927
+ ParentBackground = False
+ TabOrder = 0
+ object btnSanitize: TButton
+ AlignWithMargins = True
+ Left = 3
+ Top = 3
+ Width = 99
+ Height = 25
+ Align = alTop
+ Caption = 'Sanitize'
+ TabOrder = 0
+ OnClick = btnSanitizeClick
+ end
+ end
+ object Panel2: TPanel
+ Left = 105
+ Top = 0
+ Width = 545
+ Height = 297
+ Align = alClient
+ BevelOuter = bvNone
+ TabOrder = 1
+ object EditEmail: TLabeledEdit
+ Left = 102
+ Top = 6
+ Width = 437
+ Height = 23
+ EditLabel.Width = 29
+ EditLabel.Height = 15
+ EditLabel.Caption = 'Email'
+ LabelPosition = lpLeft
+ TabOrder = 0
+ Text = 'DEVELOPER.DLIO@GMAIL.COM'
+ end
+ object EditBase64ToDecode: TLabeledEdit
+ Left = 102
+ Top = 30
+ Width = 437
+ Height = 23
+ EditLabel.Width = 88
+ EditLabel.Height = 15
+ EditLabel.Caption = 'Base64ToDecode'
+ LabelPosition = lpLeft
+ TabOrder = 1
+ Text = 'QWNlc3NlOiBodHRwczovL2dpdGh1Yi5jb20vZGxpb2NvZGU='
+ end
+ object EditBase64ToEncode: TLabeledEdit
+ Left = 102
+ Top = 54
+ Width = 437
+ Height = 23
+ EditLabel.Width = 87
+ EditLabel.Height = 15
+ EditLabel.Caption = 'Base64ToEncode'
+ LabelPosition = lpLeft
+ TabOrder = 2
+ Text = 'Minha Mensagem'
+ end
+ object MemoInfo: TMemo
+ Left = 0
+ Top = 83
+ Width = 545
+ Height = 214
+ Align = alBottom
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ TabOrder = 3
+ end
+ end
+end
diff --git a/samples/Values/Sanitize/USanitize.pas b/samples/Values/Sanitize/USanitize.pas
new file mode 100644
index 0000000..58b6c0e
--- /dev/null
+++ b/samples/Values/Sanitize/USanitize.pas
@@ -0,0 +1,90 @@
+unit USanitize;
+
+interface
+
+uses
+ DataValidator,
+ Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
+ Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls, Vcl.Mask;
+
+type
+ TForm2 = class(TForm)
+ Panel1: TPanel;
+ btnSanitize: TButton;
+ Panel2: TPanel;
+ EditEmail: TLabeledEdit;
+ EditBase64ToDecode: TLabeledEdit;
+ EditBase64ToEncode: TLabeledEdit;
+ MemoInfo: TMemo;
+ procedure btnSanitizeClick(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ private
+ { Private declarations }
+ function Validation: IDataValidatorValueResult;
+ procedure ValidationResult(const AResult: IDataValidatorResult);
+ public
+ { Public declarations }
+ end;
+
+var
+ Form2: TForm2;
+
+implementation
+
+{$R *.dfm}
+
+procedure TForm2.btnSanitizeClick(Sender: TObject);
+var
+ LValidatorResult: IDataValidatorResult;
+begin
+ LValidatorResult := Validation.Check;
+ ValidationResult(LValidatorResult);
+end;
+
+procedure TForm2.ValidationResult(const AResult: IDataValidatorResult);
+begin
+ MemoInfo.Clear;
+
+ if AResult.OK then
+ begin
+ MemoInfo.Lines.Add(Format('Value Validate 1: %s', [AResult.Values[0]])); // Recupera o valor da 1 validao
+ MemoInfo.Lines.Add(Format('Value Validate 2: %s', [AResult.Values[1]])); // Recupera o valor da 2 validao
+ MemoInfo.Lines.Add(Format('Value Validate 3: %s', [AResult.Values[2]])); // Recupera o valor da 3 validao
+
+ Exit;
+ end;
+
+ MemoInfo.Text := AResult.Informations.Message;
+ MemoInfo.Lines.Add(Format('Total errors: %d', [AResult.Informations.Count]));
+
+ AResult.Informations.GetItem(0).OnExecute; // Executa o que foi informado no validate execute
+end;
+
+function TForm2.Validation: IDataValidatorValueResult;
+begin
+ Result :=
+ TDataValidator.Values
+ .Validate(EditEmail.Text, 'E-mail').Execute(EditEmail.SetFocus)
+ .Trim.NormalizeEmail
+ .IsEmail.WithMessage('${name} invlido')
+ .&End
+
+ .Validate(EditBase64ToDecode.Text, 'Base64ToDecode').Execute(EditBase64ToDecode.SetFocus)
+ .Trim
+ .&Not.IsEmpty.WithMessage('${name} no pode ser vazio!')
+ .IsBase64.WithMessage('${name} no um valor Base64 vlido!')
+ .ToBase64Decode
+ .&End
+
+ .Validate(EditBase64ToEncode.Text,'Base64ToEncode').Execute(EditBase64ToEncode.SetFocus)
+ .&Not.IsEmpty.WithMessage('${name} no pode ser vazio!')
+ .ToBase64Encode
+ .&End;
+end;
+
+procedure TForm2.FormCreate(Sender: TObject);
+begin
+ ReportMemoryLeaksOnShutdown := True;
+end;
+
+end.
diff --git a/samples/Values/Schema/Basic.delphilsp.json b/samples/Values/Schema/Basic.delphilsp.json
new file mode 100644
index 0000000..858c367
--- /dev/null
+++ b/samples/Values/Schema/Basic.delphilsp.json
@@ -0,0 +1 @@
+{ "settings": { "project": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/samples/Values/Schema/Basic.dpr", "dllname": "dcc32280.dll", "dccOptions": "-$O- -$W+ -$R+ -$Q+ --no-config -Q -TX.exe -AGenerics.Collections=System.Generics.Collections;Generics.Defaults=System.Generics.Defaults;WinTypes=Winapi.Windows;WinProcs=Winapi.Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -DDEBUG;;FRAMEWORK_VCL -E.\\Win32\\Debug -I\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\debug\";\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\release\";C:\\Users\\danil\\Documents\\Embarcadero\\Studio\\22.0\\Imports;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\Imports\";C:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\include\" -LEC:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Bpl -LNC:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp -NU.\\Win32\\Debug -NSWinapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell; -O\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\release\";C:\\Users\\danil\\Documents\\Embarcadero\\Studio\\22.0\\Imports;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\Imports\";C:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\include\" -R\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\release\";C:\\Users\\danil\\Documents\\Embarcadero\\Studio\\22.0\\Imports;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\Imports\";C:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\include\" -U\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\debug\";\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\release\";C:\\Users\\danil\\Documents\\Embarcadero\\Studio\\22.0\\Imports;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\Imports\";C:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\include\" -V -VN -NBC:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp -NHC:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\hpp\\Win32 -NO.\\Win32\\Debug -LU" , "projectFiles":[ { "name": "UBasic", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/samples/Values/Schema/UBasic.pas" }, { "name": "DataValidator.Context.Intf", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Context.Intf.pas" }, { "name": "DataValidator.Context", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Context.pas" }, { "name": "DataValidator.Information.Intf", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Information.Intf.pas" }, { "name": "DataValidator.Information", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Information.pas" }, { "name": "DataValidator.Intf", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Intf.pas" }, { "name": "DataValidator.ItemBase.Intf", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.ItemBase.Intf.pas" }, { "name": "DataValidator.ItemBase", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.ItemBase.pas" }, { "name": "DataValidator.ItemBase.Sanitizer", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.ItemBase.Sanitizer.pas" }, { "name": "DataValidator.JSON.Base", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.JSON.Base.pas" }, { "name": "DataValidator.JSON.Context.Intf", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.JSON.Context.Intf.pas" }, { "name": "DataValidator.JSON.Context", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.JSON.Context.pas" }, { "name": "DataValidator.JSON", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.JSON.pas" }, { "name": "DataValidator", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.pas" }, { "name": "DataValidator.Result.Intf", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Result.Intf.pas" }, { "name": "DataValidator.Result", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Result.pas" }, { "name": "DataValidator.Schema.Base", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Schema.Base.pas" }, { "name": "DataValidator.Schema", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Schema.pas" }, { "name": "DataValidator.Types", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Types.pas" }, { "name": "DataValidator.Value.Base", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Value.Base.pas" }, { "name": "DataValidator.Value", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/core/DataValidator.Value.pas" }, { "name": "Sanitizer.Base64.Decode", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.Base64.Decode.pas" }, { "name": "Sanitizer.Base64.Encode", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.Base64.Encode.pas" }, { "name": "Sanitizer.Custom", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.Custom.pas" }, { "name": "Sanitizer.HTML.Decode", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.HTML.Decode.pas" }, { "name": "Sanitizer.HTML.Encode", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.HTML.Encode.pas" }, { "name": "Sanitizer.NormalizeEmail", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.NormalizeEmail.pas" }, { "name": "Sanitizer.OnlyNumbers", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.OnlyNumbers.pas" }, { "name": "Sanitizer.RemoveAccents", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.RemoveAccents.pas" }, { "name": "Sanitizer.Replace", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.Replace.pas" }, { "name": "Sanitizer.ToDate", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.ToDate.pas" }, { "name": "Sanitizer.ToDateTime", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.ToDateTime.pas" }, { "name": "Sanitizer.ToInteger", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.ToInteger.pas" }, { "name": "Sanitizer.ToLowerCase", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.ToLowerCase.pas" }, { "name": "Sanitizer.ToMD5", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.ToMD5.pas" }, { "name": "Sanitizer.ToNumeric", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.ToNumeric.pas" }, { "name": "Sanitizer.ToTime", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.ToTime.pas" }, { "name": "Sanitizer.ToUpperCase", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.ToUpperCase.pas" }, { "name": "Sanitizer.Trim", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.Trim.pas" }, { "name": "Sanitizer.TrimLeft", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.TrimLeft.pas" }, { "name": "Sanitizer.TrimRight", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.TrimRight.pas" }, { "name": "Sanitizer.URL.Decode", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.URL.Decode.pas" }, { "name": "Sanitizer.URL.Encode", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/sanitializators/Sanitizer.URL.Encode.pas" }, { "name": "Validator.Contains", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.Contains.pas" }, { "name": "Validator.Custom", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.Custom.pas" }, { "name": "Validator.EndsWith", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.EndsWith.pas" }, { "name": "Validator.IsAlpha", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsAlpha.pas" }, { "name": "Validator.IsAlphanumeric", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsAlphanumeric.pas" }, { "name": "Validator.IsAscii", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsAscii.pas" }, { "name": "Validator.IsBase32", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsBase32.pas" }, { "name": "Validator.IsBase58", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsBase58.pas" }, { "name": "Validator.IsBase64", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsBase64.pas" }, { "name": "Validator.IsBetween", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsBetween.pas" }, { "name": "Validator.IsBoolean", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsBoolean.pas" }, { "name": "Validator.IsBTCAddress", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsBTCAddress.pas" }, { "name": "Validator.IsCNPJ", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsCNPJ.pas" }, { "name": "Validator.IsCPF", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsCPF.pas" }, { "name": "Validator.IsCPFCNPJ", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsCPFCNPJ.pas" }, { "name": "Validator.IsDate", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsDate.pas" }, { "name": "Validator.IsDateBetween", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsDateBetween.pas" }, { "name": "Validator.IsDateEquals", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsDateEquals.pas" }, { "name": "Validator.IsDateGreaterThan", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsDateGreaterThan.pas" }, { "name": "Validator.IsDateLessThan", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsDateLessThan.pas" }, { "name": "Validator.IsDateTime", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsDateTime.pas" }, { "name": "Validator.IsEmail", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsEmail.pas" }, { "name": "Validator.IsEmpty", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsEmpty.pas" }, { "name": "Validator.IsEquals", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsEquals.pas" }, { "name": "Validator.IsEthereumAddress", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsEthereumAddress.pas" }, { "name": "Validator.IsGreaterThan", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsGreaterThan.pas" }, { "name": "Validator.IsGTIN", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsGTIN.pas" }, { "name": "Validator.IsHexadecimal", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsHexadecimal.pas" }, { "name": "Validator.IsHexColor", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsHexColor.pas" }, { "name": "Validator.IsInteger", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsInteger.pas" }, { "name": "Validator.IsIP", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsIP.pas" }, { "name": "Validator.IsISO8601", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsISO8601.pas" }, { "name": "Validator.IsJSON", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsJSON.pas" }, { "name": "Validator.IsJWT", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsJWT.pas" }, { "name": "Validator.IsLatLong", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsLatLong.pas" }, { "name": "Validator.IsLength", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsLength.pas" }, { "name": "Validator.IsLessThan", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsLessThan.pas" }, { "name": "Validator.IsLocale", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsLocale.pas" }, { "name": "Validator.IsLowercase", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsLowercase.pas" }, { "name": "Validator.IsMACAddress", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsMACAddress.pas" }, { "name": "Validator.IsMagnetURI", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsMagnetURI.pas" }, { "name": "Validator.IsMD5", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsMD5.pas" }, { "name": "Validator.IsMimeType", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsMimeType.pas" }, { "name": "Validator.IsMongoId", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsMongoId.pas" }, { "name": "Validator.IsNegative", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsNegative.pas" }, { "name": "Validator.IsNumeric", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsNumeric.pas" }, { "name": "Validator.IsOctal", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsOctal.pas" }, { "name": "Validator.IsOptional", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsOptional.pas" }, { "name": "Validator.IsPassportNumber", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsPassportNumber.pas" }, { "name": "Validator.IsPhoneNumber", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsPhoneNumber.pas" }, { "name": "Validator.IsPort", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsPort.pas" }, { "name": "Validator.IsPositive", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsPositive.pas" }, { "name": "Validator.IsPostalCode", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsPostalCode.pas" }, { "name": "Validator.IsRGBColor", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsRGBColor.pas" }, { "name": "Validator.IsSSN", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsSSN.pas" }, { "name": "Validator.IsTime", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsTime.pas" }, { "name": "Validator.IsTimeBetween", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsTimeBetween.pas" }, { "name": "Validator.IsTimeEquals", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsTimeEquals.pas" }, { "name": "Validator.IsTimeGreaterThan", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsTimeGreaterThan.pas" }, { "name": "Validator.IsTimeLessThan", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsTimeLessThan.pas" }, { "name": "Validator.IsUppercase", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsUppercase.pas" }, { "name": "Validator.IsURL", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsURL.pas" }, { "name": "Validator.IsUUID", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsUUID.pas" }, { "name": "Validator.IsZero", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.IsZero.pas" }, { "name": "Validator.JSON.Key.IsOptional", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.JSON.Key.IsOptional.pas" }, { "name": "Validator.JSON.Key.IsRequired", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.JSON.Key.IsRequired.pas" }, { "name": "Validator.JSON.Value.Custom", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.JSON.Value.Custom.pas" }, { "name": "Validator.JSON.Value.IsNull", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.JSON.Value.IsNull.pas" }, { "name": "Validator.JSON.Value.MaxItems", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.JSON.Value.MaxItems.pas" }, { "name": "Validator.JSON.Value.MinItems", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.JSON.Value.MinItems.pas" }, { "name": "Validator.Regex.IsMatch", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.Regex.IsMatch.pas" }, { "name": "Validator.StartsWith", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/src/validators/Validator.StartsWith.pas" } ] , "includeDCUsInUsesCompletion": true, "browsingPaths": [ "file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/OCX/Servers","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/SOURCE/VCL","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/rtl/common","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/SOURCE/RTL/SYS","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/rtl/win","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/rtl/win/winrt","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/ToolsAPI","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/SOURCE/IBX","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Internet","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/SOURCE/PROPERTY%20EDITORS","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/soap","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/SOURCE/XML","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Indy10/Core","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Indy10/System","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Indy10/Protocols","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/fmx","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/databinding/components","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/databinding/engine","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/databinding/graph","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/ado","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/cloud","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/datasnap","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/dbx","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/dsnap","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/vclctrls","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/datasnap/connectors","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/datasnap/proxygen","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DataExplorer","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/DUnitWizard/Source/Common","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/DUnitWizard/Source/Common/dunit","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/DUnitWizard/Source/DelphiExperts/Common","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/DUnitWizard/Source/DelphiExperts/DUnitProject","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/DUnitWizard/Source/DelphiExperts/DUnitProject/dunit","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/src","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/tests","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Experts","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/indy/abstraction","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/indy/implementation","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/indyimpl","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Property%20Editors/Indy10","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/soap/wsdlimporter","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Visualizers","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/XMLReporting","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/XPGen","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/rest","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/firedac","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/tethering","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnitX","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/ems","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/rtl/net","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/FlatBox2D" ] } }
\ No newline at end of file
diff --git a/samples/Values/Schema/Schema.delphilsp.json b/samples/Values/Schema/Schema.delphilsp.json
new file mode 100644
index 0000000..ef6f74e
--- /dev/null
+++ b/samples/Values/Schema/Schema.delphilsp.json
@@ -0,0 +1 @@
+{ "settings": { "project": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/samples/Values/Schema/Schema.dpr", "dllname": "dcc32280.dll", "dccOptions": "-$O- -$W+ -$R+ -$Q+ --no-config -Q -TX.exe -AGenerics.Collections=System.Generics.Collections;Generics.Defaults=System.Generics.Defaults;WinTypes=Winapi.Windows;WinProcs=Winapi.Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -DDEBUG;;FRAMEWORK_VCL -E.\\Win32\\Debug -I\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\debug\";..\\..\\..\\src\\core;..\\..\\..\\src\\sanitializators;..\\..\\..\\src\\validators;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\release\";C:\\Users\\danil\\Documents\\Embarcadero\\Studio\\22.0\\Imports;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\Imports\";C:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\include\" -LEC:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Bpl -LNC:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp -NU.\\Win32\\Debug -NSWinapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell; -O..\\..\\..\\src\\core;..\\..\\..\\src\\sanitializators;..\\..\\..\\src\\validators;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\release\";C:\\Users\\danil\\Documents\\Embarcadero\\Studio\\22.0\\Imports;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\Imports\";C:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\include\" -R..\\..\\..\\src\\core;..\\..\\..\\src\\sanitializators;..\\..\\..\\src\\validators;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\release\";C:\\Users\\danil\\Documents\\Embarcadero\\Studio\\22.0\\Imports;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\Imports\";C:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\include\" -U\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\debug\";..\\..\\..\\src\\core;..\\..\\..\\src\\sanitializators;..\\..\\..\\src\\validators;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\lib\\Win32\\release\";C:\\Users\\danil\\Documents\\Embarcadero\\Studio\\22.0\\Imports;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\Imports\";C:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp;\"c:\\program files (x86)\\embarcadero\\studio\\22.0\\include\" -V -VN -NBC:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\Dcp -NHC:\\Users\\Public\\Documents\\Embarcadero\\Studio\\22.0\\hpp\\Win32 -NO.\\Win32\\Debug -LU" , "projectFiles":[ { "name": "USchema", "file": "file:///Z%3A/DADOS/Projetos/Github/DataValidation/samples/Values/Schema/USchema.pas" } ] , "includeDCUsInUsesCompletion": true, "browsingPaths": [ "file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/OCX/Servers","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/SOURCE/VCL","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/rtl/common","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/SOURCE/RTL/SYS","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/rtl/win","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/rtl/win/winrt","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/ToolsAPI","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/SOURCE/IBX","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Internet","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/SOURCE/PROPERTY%20EDITORS","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/soap","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/SOURCE/XML","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Indy10/Core","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Indy10/System","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Indy10/Protocols","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/fmx","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/databinding/components","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/databinding/engine","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/databinding/graph","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/ado","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/cloud","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/datasnap","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/dbx","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/dsnap","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/vclctrls","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/datasnap/connectors","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/datasnap/proxygen","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DataExplorer","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/DUnitWizard/Source/Common","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/DUnitWizard/Source/Common/dunit","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/DUnitWizard/Source/DelphiExperts/Common","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/DUnitWizard/Source/DelphiExperts/DUnitProject","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/DUnitWizard/Source/DelphiExperts/DUnitProject/dunit","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/src","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/tests","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Experts","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/indy/abstraction","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/indy/implementation","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/indyimpl","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Property%20Editors/Indy10","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/soap/wsdlimporter","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/Visualizers","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/XMLReporting","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnit/Contrib/XPGen","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/rest","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/firedac","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/tethering","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/DUnitX","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/data/ems","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/rtl/net","file:///c%3A/program%20files%20%28x86%29/embarcadero/studio/22.0/source/FlatBox2D" ] } }
\ No newline at end of file
diff --git a/samples/Values/Schema/Schema.dpr b/samples/Values/Schema/Schema.dpr
new file mode 100644
index 0000000..c990a31
--- /dev/null
+++ b/samples/Values/Schema/Schema.dpr
@@ -0,0 +1,14 @@
+program Schema;
+
+uses
+ Vcl.Forms,
+ USchema in 'USchema.pas' {Form2};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.MainFormOnTaskbar := True;
+ Application.CreateForm(TForm2, Form2);
+ Application.Run;
+end.
diff --git a/samples/Model 2 - Schema/Model2.dproj b/samples/Values/Schema/Schema.dproj
similarity index 87%
rename from samples/Model 2 - Schema/Model2.dproj
rename to samples/Values/Schema/Schema.dproj
index 6d3aacf..b5c4109 100644
--- a/samples/Model 2 - Schema/Model2.dproj
+++ b/samples/Values/Schema/Schema.dproj
@@ -1,14 +1,14 @@
- {D02AF752-1350-40DA-810F-0BB5E2B18D75}
- 19.2
+ {003881DF-B1A2-46DF-906B-76CFCE2C63D1}
+ 19.4
VCL
True
Debug
Win32
1
Application
- Model2.dpr
+ Schema.dpr
true
@@ -57,19 +57,23 @@
$(BDS)\bin\delphi_PROJECTICON.ico
$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png
$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png
- Model2
+ Schema
+ ..\..\..\src\core;..\..\..\src\sanitializators;..\..\..\src\validators;$(DCC_UnitSearchPath)
+ 1046
+ CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=
- DBXSqliteDriver;RESTComponents;fmxase;DBXDb2Driver;DBXInterBaseDriver;vclactnband;vclFireDAC;bindcompvclsmp;emsclientfiredac;tethering;svnui;DataSnapFireDAC;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;svn;DBXOracleDriver;inetdb;FmxTeeUI;emsedge;fmx;FireDACIBDriver;fmxdae;vcledge;vclib;FireDACDBXDriver;dbexpress;IndyCore;vclx;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;vclie;bindengine;DBXMySQLDriver;CloudService;FireDACOracleDriver;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;vcl;IndyIPServer;DBXSybaseASEDriver;IndySystem;FireDACDb2Driver;bindcompvclwinx;dsnapcon;madExcept_;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;madBasic_;TeeDB;FireDAC;emshosting;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;ibxpress;Tee;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;FireDACDSDriver;rtl;emsserverresource;DbxClientDriver;ibxbindings;DBXSybaseASADriver;madDisAsm_;CustomIPTransport;vcldsnap;bindcomp;appanalytics;DBXInformixDriver;IndyIPClient;bindcompvcl;TeeUI;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;inetdbxpress;FireDACMongoDBDriver;DataSnapServerMidas;$(DCC_UsePackage)
+ vclwinx;DataSnapServer;fmx;emshosting;vclie;DbxCommonDriver;bindengine;IndyIPCommon;VCLRESTComponents;DBXMSSQLDriver;FireDACCommonODBC;emsclient;FireDACCommonDriver;appanalytics;IndyProtocols;vclx;IndyIPClient;dbxcds;vcledge;bindcompvclwinx;FmxTeeUI;emsedge;bindcompfmx;DBXFirebirdDriver;inetdb;ibmonitor;FireDACSqliteDriver;DbxClientDriver;FireDACASADriver;Tee;soapmidas;vclactnband;TeeUI;fmxFireDAC;dbexpress;FireDACInfxDriver;DBXMySQLDriver;VclSmp;inet;DataSnapCommon;vcltouch;fmxase;DBXOdbcDriver;dbrtl;FireDACDBXDriver;FireDACOracleDriver;fmxdae;TeeDB;FireDACMSAccDriver;CustomIPTransport;FireDACMSSQLDriver;DataSnapIndy10ServerTransport;DataSnapConnectors;vcldsnap;DBXInterBaseDriver;FireDACMongoDBDriver;IndySystem;FireDACTDataDriver;vcldb;ibxbindings;vclFireDAC;bindcomp;FireDACCommon;DataSnapServerMidas;FireDACODBCDriver;emsserverresource;IndyCore;RESTBackendComponents;bindcompdbx;rtl;FireDACMySQLDriver;FireDACADSDriver;RESTComponents;DBXSqliteDriver;vcl;IndyIPServer;dsnapxml;dsnapcon;DataSnapClient;DataSnapProviderClient;adortl;DBXSybaseASEDriver;DBXDb2Driver;vclimg;DataSnapFireDAC;emsclientfiredac;FireDACPgDriver;FireDAC;FireDACDSDriver;inetdbxpress;xmlrtl;tethering;ibxpress;bindcompvcl;dsnap;CloudService;DBXSybaseASADriver;DBXOracleDriver;FireDACDb2Driver;DBXInformixDriver;vclib;fmxobj;bindcompvclsmp;DataSnapNativeClient;FMXTee;DatasnapConnectorsFreePascal;soaprtl;soapserver;FireDACIBDriver;$(DCC_UsePackage)
Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
Debug
true
CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=
1033
$(BDS)\bin\default_app.manifest
+ true
- DBXSqliteDriver;RESTComponents;fmxase;DBXDb2Driver;DBXInterBaseDriver;vclactnband;vclFireDAC;bindcompvclsmp;emsclientfiredac;tethering;DataSnapFireDAC;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;DBXOracleDriver;inetdb;FmxTeeUI;emsedge;fmx;FireDACIBDriver;fmxdae;vcledge;vclib;FireDACDBXDriver;dbexpress;IndyCore;vclx;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;vclie;bindengine;DBXMySQLDriver;CloudService;FireDACOracleDriver;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;vcl;IndyIPServer;DBXSybaseASEDriver;IndySystem;FireDACDb2Driver;bindcompvclwinx;dsnapcon;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;TeeDB;FireDAC;emshosting;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;ibxpress;Tee;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;FireDACDSDriver;rtl;emsserverresource;DbxClientDriver;ibxbindings;DBXSybaseASADriver;CustomIPTransport;vcldsnap;bindcomp;appanalytics;DBXInformixDriver;IndyIPClient;bindcompvcl;TeeUI;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;inetdbxpress;FireDACMongoDBDriver;DataSnapServerMidas;$(DCC_UsePackage)
+ vclwinx;DataSnapServer;fmx;emshosting;vclie;DbxCommonDriver;bindengine;IndyIPCommon;VCLRESTComponents;DBXMSSQLDriver;FireDACCommonODBC;emsclient;FireDACCommonDriver;appanalytics;IndyProtocols;vclx;IndyIPClient;dbxcds;vcledge;bindcompvclwinx;FmxTeeUI;emsedge;bindcompfmx;DBXFirebirdDriver;inetdb;ibmonitor;FireDACSqliteDriver;DbxClientDriver;FireDACASADriver;Tee;soapmidas;vclactnband;TeeUI;fmxFireDAC;dbexpress;FireDACInfxDriver;DBXMySQLDriver;VclSmp;inet;DataSnapCommon;vcltouch;fmxase;DBXOdbcDriver;dbrtl;FireDACDBXDriver;FireDACOracleDriver;fmxdae;TeeDB;FireDACMSAccDriver;CustomIPTransport;FireDACMSSQLDriver;DataSnapIndy10ServerTransport;DataSnapConnectors;vcldsnap;DBXInterBaseDriver;FireDACMongoDBDriver;IndySystem;FireDACTDataDriver;vcldb;ibxbindings;vclFireDAC;bindcomp;FireDACCommon;DataSnapServerMidas;FireDACODBCDriver;emsserverresource;IndyCore;RESTBackendComponents;bindcompdbx;rtl;FireDACMySQLDriver;FireDACADSDriver;RESTComponents;DBXSqliteDriver;vcl;IndyIPServer;dsnapxml;dsnapcon;DataSnapClient;DataSnapProviderClient;adortl;DBXSybaseASEDriver;DBXDb2Driver;vclimg;DataSnapFireDAC;emsclientfiredac;FireDACPgDriver;FireDAC;FireDACDSDriver;inetdbxpress;xmlrtl;tethering;ibxpress;bindcompvcl;dsnap;CloudService;DBXSybaseASADriver;DBXOracleDriver;FireDACDb2Driver;DBXInformixDriver;vclib;fmxobj;bindcompvclsmp;DataSnapNativeClient;FMXTee;DatasnapConnectorsFreePascal;soaprtl;soapserver;FireDACIBDriver;$(DCC_UsePackage)
DEBUG;$(DCC_Define)
@@ -78,12 +82,13 @@
true
true
true
+ true
+ true
false
true
PerMonitorV2
- ..\..\src\core;..\..\src\sanitializators;..\..\src\validators;$(DCC_UnitSearchPath)
true
1033
@@ -101,14 +106,10 @@
MainSource
-
-
+
+
dfm
-
- Cfg_2
- Base
-
Base
@@ -116,6 +117,10 @@
Cfg_1
Base
+
+ Cfg_2
+ Base
+
Delphi.Personality.12
@@ -123,19 +128,19 @@
- Model2.dpr
+ Schema.dpr
- Embarcadero C++Builder Office 2000 Servers Package
- Embarcadero C++Builder Office XP Servers Package
- Microsoft Office 2000 Sample Automation Server Wrapper Components
- Microsoft Office XP Sample Automation Server Wrapper Components
+ Embarcadero C++Builder Office 2000 Servers Package
+ Embarcadero C++Builder Office XP Servers Package
+ Microsoft Office 2000 Sample Automation Server Wrapper Components
+ Microsoft Office XP Sample Automation Server Wrapper Components
-
+
- Model2.exe
+ Schema.exe
true
@@ -151,14 +156,14 @@
0
-
+
classes
- 1
+ 64
classes
- 1
+ 64
@@ -452,6 +457,11 @@
1
.framework
+
+ Contents\MacOS
+ 1
+ .framework
+
0
@@ -479,6 +489,11 @@
1
.dylib
+
+ Contents\MacOS
+ 1
+ .dylib
+
0
.dll;.bpl
@@ -507,6 +522,11 @@
1
.dylib
+
+ Contents\MacOS
+ 1
+ .dylib
+
0
.bpl
@@ -536,6 +556,10 @@
Contents\Resources\StartUp\
0
+
+ Contents\Resources\StartUp\
+ 0
+
0
@@ -801,6 +825,10 @@
..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
1
+
+ ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
+ 1
+
@@ -811,6 +839,10 @@
..\
1
+
+ ..\
+ 1
+
@@ -821,6 +853,10 @@
Contents
1
+
+ Contents
+ 1
+
@@ -831,6 +867,10 @@
Contents\Resources
1
+
+ Contents\Resources
+ 1
+
@@ -861,6 +901,10 @@
Contents\MacOS
1
+
+ Contents\MacOS
+ 1
+
0
@@ -899,16 +943,17 @@
1
-
-
+
+
+
+
-
-
-
-
+
+
+
True
diff --git a/samples/Values/Schema/USchema.dfm b/samples/Values/Schema/USchema.dfm
new file mode 100644
index 0000000..3621812
--- /dev/null
+++ b/samples/Values/Schema/USchema.dfm
@@ -0,0 +1,131 @@
+object Form2: TForm2
+ Left = 0
+ Top = 0
+ BorderIcons = [biSystemMenu, biMinimize]
+ Caption = 'DataValidator - Schema'
+ ClientHeight = 117
+ ClientWidth = 650
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -12
+ Font.Name = 'Segoe UI'
+ Font.Style = []
+ OnCreate = FormCreate
+ TextHeight = 15
+ object Panel1: TPanel
+ Left = 0
+ Top = 0
+ Width = 105
+ Height = 117
+ Align = alLeft
+ BevelOuter = bvNone
+ Color = 2565927
+ ParentBackground = False
+ TabOrder = 0
+ object btnLimpar: TButton
+ AlignWithMargins = True
+ Left = 3
+ Top = 3
+ Width = 99
+ Height = 25
+ Align = alTop
+ Caption = 'Limpar'
+ TabOrder = 0
+ OnClick = btnLimparClick
+ end
+ object btnCheck: TButton
+ AlignWithMargins = True
+ Left = 3
+ Top = 31
+ Width = 99
+ Height = 25
+ Margins.Top = 0
+ Align = alTop
+ Caption = 'Check'
+ TabOrder = 1
+ OnClick = btnCheckClick
+ end
+ object btnCheckAllFirst: TButton
+ AlignWithMargins = True
+ Left = 3
+ Top = 87
+ Width = 99
+ Height = 25
+ Margins.Top = 0
+ Align = alTop
+ Caption = 'CheckAll (First)'
+ TabOrder = 2
+ OnClick = btnCheckAllFirstClick
+ end
+ object btnCheckAll: TButton
+ AlignWithMargins = True
+ Left = 3
+ Top = 59
+ Width = 99
+ Height = 25
+ Margins.Top = 0
+ Align = alTop
+ Caption = 'CheckAll'
+ TabOrder = 3
+ OnClick = btnCheckAllClick
+ end
+ end
+ object Panel2: TPanel
+ Left = 105
+ Top = 0
+ Width = 545
+ Height = 117
+ Align = alClient
+ BevelOuter = bvNone
+ TabOrder = 1
+ object EditCodigo: TLabeledEdit
+ Left = 70
+ Top = 5
+ Width = 59
+ Height = 23
+ EditLabel.Width = 39
+ EditLabel.Height = 15
+ EditLabel.Caption = 'C'#243'digo'
+ LabelPosition = lpLeft
+ TabOrder = 0
+ Text = ''
+ end
+ object EditNome: TLabeledEdit
+ Left = 70
+ Top = 29
+ Width = 443
+ Height = 23
+ EditLabel.Width = 33
+ EditLabel.Height = 15
+ EditLabel.Caption = 'Nome'
+ LabelPosition = lpLeft
+ TabOrder = 1
+ Text = ''
+ end
+ object EditNomeMeio: TLabeledEdit
+ Left = 70
+ Top = 53
+ Width = 443
+ Height = 23
+ EditLabel.Width = 63
+ EditLabel.Height = 15
+ EditLabel.Caption = 'Nome Meio'
+ LabelPosition = lpLeft
+ TabOrder = 2
+ Text = ''
+ end
+ object EditApelido: TLabeledEdit
+ Left = 70
+ Top = 77
+ Width = 443
+ Height = 23
+ EditLabel.Width = 41
+ EditLabel.Height = 15
+ EditLabel.Caption = 'Apelido'
+ LabelPosition = lpLeft
+ TabOrder = 3
+ Text = ''
+ end
+ end
+end
diff --git a/samples/Values/Schema/USchema.pas b/samples/Values/Schema/USchema.pas
new file mode 100644
index 0000000..91978c7
--- /dev/null
+++ b/samples/Values/Schema/USchema.pas
@@ -0,0 +1,128 @@
+unit USchema;
+
+interface
+
+uses
+ DataValidator,
+ Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
+ Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls, Vcl.Mask;
+
+type
+ TForm2 = class(TForm)
+ Panel1: TPanel;
+ btnLimpar: TButton;
+ btnCheck: TButton;
+ Panel2: TPanel;
+ EditCodigo: TLabeledEdit;
+ EditNome: TLabeledEdit;
+ btnCheckAllFirst: TButton;
+ btnCheckAll: TButton;
+ EditNomeMeio: TLabeledEdit;
+ EditApelido: TLabeledEdit;
+ procedure btnLimparClick(Sender: TObject);
+ procedure btnCheckClick(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ procedure btnCheckAllClick(Sender: TObject);
+ procedure btnCheckAllFirstClick(Sender: TObject);
+ private
+ { Private declarations }
+ function SchemaNome: IDataValidatorSchemaContext;
+ function Validation: IDataValidatorValueResult;
+ procedure ValidationResult(const AResult: IDataValidatorResult);
+ public
+ { Public declarations }
+ end;
+
+var
+ Form2: TForm2;
+
+implementation
+
+{$R *.dfm}
+
+procedure TForm2.btnLimparClick(Sender: TObject);
+var
+ I : Integer;
+begin
+ for I := 0 to Pred(Self.ComponentCount) do
+ if (Self.Components[i] is TLabeledEdit) then
+ (Self.Components[i] as TLabeledEdit).Clear;
+end;
+
+procedure TForm2.btnCheckClick(Sender: TObject);
+var
+ LValidatorResult: IDataValidatorResult;
+begin
+ LValidatorResult := Validation.Check;
+ ValidationResult(LValidatorResult);
+end;
+
+procedure TForm2.btnCheckAllClick(Sender: TObject);
+var
+ LValidatorResult: IDataValidatorResult;
+begin
+ LValidatorResult := Validation.CheckAll();
+ ValidationResult(LValidatorResult);
+end;
+
+procedure TForm2.btnCheckAllFirstClick(Sender: TObject);
+var
+ LValidatorResult: IDataValidatorResult;
+begin
+ LValidatorResult := Validation.CheckAll(TDataValidatorCheckAll.tcFirst);
+ ValidationResult(LValidatorResult);
+end;
+
+procedure TForm2.ValidationResult(const AResult: IDataValidatorResult);
+begin
+ if AResult.OK then
+ ShowMessage('Tudo certo!')
+ else
+ begin
+ ShowMessage('Problema na validao: ' + sLineBreak + sLineBreak + AResult.Informations.Message);
+ AResult.Informations.GetItem(0).OnExecute;
+ end;
+end;
+
+function TForm2.Validation: IDataValidatorValueResult;
+begin
+ Result :=
+ TDataValidator.Values
+ .Validate(EditCodigo.Text, 'Cdigo').Execute(EditCodigo.SetFocus)
+ .Trim
+ .&Not.IsEmpty.WithMessage('O campo ${name} no pode ser vazio!')
+ .IsInteger.WithMessage('Informe somente nmeros no campo ${name}!')
+ .IsGreaterThan(0).WithMessage('Informe um ${name} maior que zero!')
+ .&End
+
+ .Validate(EditNome.Text, 'Nome').Execute(EditNome.SetFocus)
+ .AddSchema(SchemaNome)
+ .&End
+
+ .Validate(EditNomeMeio.Text, 'Nome do Meio').Execute(EditNomeMeio.SetFocus)
+ .AddSchema(SchemaNome)
+ .&End
+
+ .Validate(EditApelido.Text, 'Apelido').Execute(EditApelido.SetFocus)
+ .AddSchema(SchemaNome)
+ .&End
+end;
+
+procedure TForm2.FormCreate(Sender: TObject);
+begin
+ ReportMemoryLeaksOnShutdown := True;
+end;
+
+function TForm2.SchemaNome: IDataValidatorSchemaContext;
+begin
+ Result :=
+ TDataValidator.Schema
+ .Validate
+ .Trim
+ .&Not.IsEmpty.WithMessage('O campo ${name} no pode ser vazio!')
+ .&Not.IsInteger.WithMessage('O campo ${name} no pode conter nmeros!')
+ .IsLength(3, 0).WithMessage('Informe um ${name} maior que 3 caracteres!')
+ .&End;
+end;
+
+end.
diff --git a/samples/model 1/Model1.dpr b/samples/model 1/Model1.dpr
deleted file mode 100644
index 0911f34..0000000
--- a/samples/model 1/Model1.dpr
+++ /dev/null
@@ -1,16 +0,0 @@
-program Model1;
-
-uses
- Vcl.Forms,
- usample in 'usample.pas' {Form1};
-
-{$R *.res}
-
-begin
- ReportMemoryLeaksOnShutdown := True;
-
- Application.Initialize;
- Application.MainFormOnTaskbar := True;
- Application.CreateForm(TForm1, Form1);
- Application.Run;
-end.
diff --git a/samples/model 1/usample.dfm b/samples/model 1/usample.dfm
deleted file mode 100644
index 2e3c6fd..0000000
--- a/samples/model 1/usample.dfm
+++ /dev/null
@@ -1,131 +0,0 @@
-object Form1: TForm1
- Left = 0
- Top = 0
- Caption = 'Form '
- ClientHeight = 527
- ClientWidth = 388
- Color = clBtnFace
- Font.Charset = DEFAULT_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'Tahoma'
- Font.Style = []
- OldCreateOrder = False
- PixelsPerInch = 96
- TextHeight = 13
- object LabelMatematica: TLabel
- Left = 93
- Top = 75
- Width = 36
- Height = 13
- Caption = '3 / 3 = '
- end
- object LabeledEditNome: TLabeledEdit
- Left = 8
- Top = 24
- Width = 121
- Height = 21
- EditLabel.Width = 27
- EditLabel.Height = 13
- EditLabel.Caption = 'Nome'
- TabOrder = 0
- end
- object LabeledEditIdade: TLabeledEdit
- Left = 135
- Top = 24
- Width = 121
- Height = 21
- EditLabel.Width = 28
- EditLabel.Height = 13
- EditLabel.Caption = 'Idade'
- TabOrder = 1
- end
- object LabeledEditDataNascimento: TLabeledEdit
- Left = 262
- Top = 24
- Width = 121
- Height = 21
- EditLabel.Width = 96
- EditLabel.Height = 13
- EditLabel.Caption = 'Data de Nascimento'
- TabOrder = 2
- end
- object LabeledEditResultado: TLabeledEdit
- Left = 135
- Top = 72
- Width = 121
- Height = 21
- EditLabel.Width = 48
- EditLabel.Height = 13
- EditLabel.Caption = 'Resultado'
- TabOrder = 3
- end
- object btnValidarTodos: TButton
- Left = 8
- Top = 195
- Width = 177
- Height = 41
- Caption = 'Validar todos os campos'
- TabOrder = 4
- OnClick = btnValidarTodosClick
- end
- object LabeledEditCNPJ: TLabeledEdit
- Left = 8
- Top = 120
- Width = 121
- Height = 21
- EditLabel.Width = 25
- EditLabel.Height = 13
- EditLabel.Caption = 'CNPJ'
- TabOrder = 5
- end
- object LabeledEditCPF: TLabeledEdit
- Left = 135
- Top = 120
- Width = 121
- Height = 21
- EditLabel.Width = 19
- EditLabel.Height = 13
- EditLabel.Caption = 'CPF'
- TabOrder = 6
- end
- object LabeledEditEmail: TLabeledEdit
- Left = 8
- Top = 168
- Width = 375
- Height = 21
- EditLabel.Width = 24
- EditLabel.Height = 13
- EditLabel.Caption = 'Email'
- TabOrder = 7
- end
- object LabeledEditCPFCNPJ: TLabeledEdit
- Left = 262
- Top = 120
- Width = 121
- Height = 21
- EditLabel.Width = 48
- EditLabel.Height = 13
- EditLabel.Caption = 'CPF/CNPJ'
- TabOrder = 8
- end
- object Memo1: TMemo
- Left = 0
- Top = 242
- Width = 388
- Height = 285
- Align = alBottom
- Anchors = [akLeft, akTop, akRight, akBottom]
- ReadOnly = True
- TabOrder = 9
- end
- object btnValidar: TButton
- Left = 206
- Top = 195
- Width = 177
- Height = 41
- Caption = 'Validar '
- TabOrder = 10
- OnClick = btnValidarClick
- end
-end
diff --git a/samples/model 1/usample.pas b/samples/model 1/usample.pas
deleted file mode 100644
index 5a3b983..0000000
--- a/samples/model 1/usample.pas
+++ /dev/null
@@ -1,125 +0,0 @@
-unit usample;
-
-interface
-
-uses
- DataValidator,
-
- Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
- Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls;
-
-type
- TForm1 = class(TForm)
- LabeledEditNome: TLabeledEdit;
- LabeledEditIdade: TLabeledEdit;
- LabeledEditDataNascimento: TLabeledEdit;
- LabeledEditResultado: TLabeledEdit;
- LabelMatematica: TLabel;
- btnValidarTodos: TButton;
- LabeledEditCNPJ: TLabeledEdit;
- LabeledEditCPF: TLabeledEdit;
- LabeledEditEmail: TLabeledEdit;
- LabeledEditCPFCNPJ: TLabeledEdit;
- Memo1: TMemo;
- btnValidar: TButton;
- procedure btnValidarTodosClick(Sender: TObject);
- procedure btnValidarClick(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- function Valid: IDataValidatorValueResult;
- procedure ShowResult(const AResult: IDataValidatorResult);
- end;
-
-var
- Form1: TForm1;
-
-implementation
-
-{$R *.dfm}
-
-procedure TForm1.btnValidarClick(Sender: TObject);
-begin
- ShowResult(Valid.Check);
-end;
-
-procedure TForm1.btnValidarTodosClick(Sender: TObject);
-begin
- ShowResult(Valid.CheckAll);
-end;
-
-procedure TForm1.ShowResult(const AResult: IDataValidatorResult);
-begin
- Memo1.Clear;
-
- if AResult.OK then
- Exit;
-
- Memo1.Text := AResult.Informations.Message;
- Memo1.Lines.Add(Format('Value validate: %s',[AResult.Informations.GetItem(0).Value]));
- Memo1.Lines.Add(Format('Total errors: %d',[AResult.Informations.Count]));
-
- AResult.Informations.GetItem(0).OnExecute;
-end;
-
-function TForm1.Valid: IDataValidatorValueResult;
-begin
- Result :=
-
- TDataValidator.Values
-
- .Validate(LabeledEditNome.Text).Execute(LabeledEditNome.SetFocus)
- .Trim
- .&Not.IsEmpty.WithMessage('Informe um nome!') // No pode ser vazio
- .IsLength(0,10).WithMessage('O nome deve conter no mximo 10 caracteres!')
- .IsAlpha(TDataValidatorLocaleLanguage.tl_pt_BR).WithMessage('Nome com caracteres invlidos!')
- .&End
-
- .Validate(LabeledEditIdade.Text)
- .Trim
- .&Not.IsEmpty.WithMessage('Informe a idade!') // No pode ser vazio
- .IsNumeric.WithMessage('Deve ser nmerico!')
- .&Not.IsNegative.WithMessage('A idade no pode ser negativo!')
- .&Not.IsZero.WithMessage('A idade no pode ser zero!')
- .&Not.IsLessThan(18).WithMessage('No permitido idade menor que 18!')
- .&Not.IsGreaterThan(64).WithMessage('No permitido idade maior que 64!')
- .&End
-
- .Validate(LabeledEditDataNascimento.Text)
- .IsDate.WithMessage('Data de Nascimento invlida!')
- .&Not.IsDateGreaterThan(Now).WithMessage('Data de Nascimento no pode ser maior que e a data atual!')
- .&End
-
- .Validate(LabeledEditResultado.Text)
- .Trim
- .&Not.IsEmpty.WithMessage('Informe o resultado!') // No pode ser vazio
- .IsEquals('1').WithMessage('Resultado invlido!')
- .&End
-
- .Validate(LabeledEditCNPJ.Text)
- .Trim
- .&Not.IsEmpty.WithMessage('Informe o CNPJ!') // No pode ser vazio
- .IsCNPJ.WithMessage('CNPJ invlido!')
- .&End
-
- .Validate(LabeledEditCPF.Text)
- .Trim
- .&Not.IsEmpty.WithMessage('Informe o CPF!') // No pode ser vazio
- .IsCPF.WithMessage('CPF invlido!')
- .&End
-
- .Validate(LabeledEditCPFCNPJ.Text)
- .Trim
- .&Not.IsEmpty.WithMessage('Informe o CPF ou CNPJ!') // No pode ser vazio
- .IsCPFCNPJ.WithMessage('CPF/CNPJ invlido!')
- .&End
-
- .Validate(LabeledEditEmail.Text)
- .Trim
- .&Not.IsEmpty.WithMessage('Informe o Email!') // No pode ser vazi
- .IsEmail.WithMessage('Email invlido!')
- .&End
-end;
-
-end.
diff --git a/src/core/DataValidator.Context.Intf.pas b/src/core/DataValidator.Context.Intf.pas
deleted file mode 100644
index 7f75914..0000000
--- a/src/core/DataValidator.Context.Intf.pas
+++ /dev/null
@@ -1,196 +0,0 @@
-{
- ********************************************************************************
-
- Github - https://github.com/dliocode/datavalidator
-
- ********************************************************************************
-
- MIT License
-
- Copyright (c) 2021 Danilo Lucas
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-
- ********************************************************************************
-}
-
-unit DataValidator.Context.Intf;
-
-interface
-
-uses
- DataValidator.Types, DataValidator.ItemBase.Intf,
- System.Generics.Collections, System.Rtti;
-
-type
- IDataValidatorSchemaContext = interface
- ['{B282DFB4-FDDC-424C-8C76-C8265822C79B}']
- end;
-
- IDataValidatorContextMessage = interface
- ['{54CF9567-25E9-4B1A-A62B-7F270E5351E2}']
- function WithMessage(const AMessage: TDataValidatorWithMessage): T; overload;
- function WithMessage(const AMessage: string): T; overload;
- function WithMessage(const AMessage: string; const AParams: array of const): T; overload;
- function Execute(const AExecute: TDataValidatorInformationExecute): T;
- end;
-
- IDataValidatorContextSanitizer = interface(IDataValidatorContextMessage)
- ['{80BCAFBF-2BBB-46FA-9C39-E7CC7D188350}']
- function CustomSanitizer(const ASanitizerItem: IDataSanitizerItem): T; overload;
- function CustomSanitizer(const AExecute: TDataValidatorCustomSanitizer): T; overload;
- function NormalizeEmail(const AAllLowercase: Boolean = True; const AGmailRemoveDots: Boolean = True): T;
- function OnlyNumbers: T;
- function RemoveAccents: T;
- function Replace(const AOldValue: string; const ANewValue: string): T;
- function ToBase64Decode: T;
- function ToBase64Encode: T;
- function ToDate(const AJSONISO8601ReturnUTC: Boolean = True): T;
- function ToDateTime(const AJSONISO8601ReturnUTC: Boolean = True): T;
- function ToHTMLDecode: T;
- function ToHTMLEncode: T;
- function ToInteger: T;
- function ToLowerCase: T;
- function ToMD5: T;
- function ToNumeric: T;
- function ToTime(const AJSONISO8601ReturnUTC: Boolean = True): T;
- function ToUpperCase: T;
- function ToURLDecode: T;
- function ToURLEncode: T;
- function Trim: T;
- function TrimLeft: T;
- function TrimRight: T;
- end;
-
- IDataValidatorContextValidator = interface(IDataValidatorContextSanitizer)
- ['{F61EA315-86CA-4807-B1A1-F9030FADB844}']
- function CustomValue(const ADataItem: IDataValidatorItem): T; overload;
- function CustomValue(const AExecute: TDataValidatorCustomValue): T; overload;
- function CustomValue(const AExecute: TDataValidatorCustomValueMessage): T; overload;
- function CustomValue(const AExecute: TDataValidatorCustomMessage): T; overload;
- function Contains(const AValueContains: string; const ACaseSensitive: Boolean = False): T; overload;
- function Contains(const AValueContains: TArray; const ACaseSensitive: Boolean = False): T; overload;
- function EndsWith(const AValueEndsWith: string; const ACaseSensitive: Boolean = False): T; overload;
- function EndsWith(const AValueEndsWith: TArray; const ACaseSensitive: Boolean = False): T; overload;
- function IsAlpha(const ALocaleLanguage: TDataValidatorLocaleLanguage = tl_en_US): T;
- function IsAlphaNumeric(const ALocaleLanguage: TDataValidatorLocaleLanguage = tl_en_US): T;
- function IsAscii: T;
- function IsBase32: T;
- function IsBase58: T;
- function IsBase64: T;
- function IsBetween(const AValueA: Integer; const AValueB: Integer): T; overload;
- function IsBetween(const AValueA: Int64; const AValueB: Int64): T; overload;
- function IsBetween(const AValueA: Double; const AValueB: Double): T; overload;
- function IsBetween(const AValueA: Extended; const AValueB: Extended): T; overload;
- function IsBetween(const AValueA: Single; const AValueB: Single): T; overload;
- function IsBetween(const AValueA: UInt64; const AValueB: UInt64): T; overload;
- function IsBoolean: T;
- function IsBTCAddress: T;
- function IsCNPJ: T;
- function IsCPF: T;
- function IsCPFCNPJ: T;
- function IsDate(const AJSONISO8601ReturnUTC: Boolean = True): T;
- function IsDateBetween(const AValueA: TDate; const AValueB: TDate; const AJSONISO8601ReturnUTC: Boolean = True): T;
- function IsDateEquals(const ACompareDate: TDate; const AJSONISO8601ReturnUTC: Boolean = True): T;
- function IsDateGreaterThan(const ACompareDate: TDate; const AJSONISO8601ReturnUTC: Boolean = True): T;
- function IsDateLessThan(const ACompareDate: TDate; const AJSONISO8601ReturnUTC: Boolean = True): T;
- function IsDateTime(const AJSONISO8601ReturnUTC: Boolean = True): T;
- function IsEmail: T;
- function IsEmpty: T;
- function IsEquals(const AValueEquals: string; const ACaseSensitive: Boolean = False): T; overload;
- function IsEquals(const AValueEquals: TArray; const ACaseSensitive: Boolean = False): T; overload;
- function IsEthereumAddress: T;
- function IsGreaterThan(const AValueGreaterThan: Integer): T;
- function IsGTIN: T;
- function IsGTIN8: T;
- function IsGTIN12: T;
- function IsGTIN13: T;
- function IsGTIN14: T;
- function IsHexadecimal: T;
- function IsHexColor: T;
- function IsInteger: T;
- function IsIP: T;
- function IsIPv4: T;
- function IsIPv6: T;
- function IsISO8601: T;
- function IsJSON: T;
- function IsJSONArray: T;
- function IsJSONObject: T;
- function IsJWT: T;
- function IsLatLong(const ACheckDMS: Boolean = False): T;
- function IsLength(const AMin: Integer; const AMax: Integer): T;
- function IsLessThan(const AValueLessThan: Integer): T;
- function IsLocale: T;
- function IsLowercase: T;
- function IsMACAddress: T;
- function IsMagnetURI: T;
- function IsMD5: T;
- function IsMimeType: T;
- function IsMongoId: T;
- function IsNegative: T;
- function IsNumeric: T;
- function IsOctal: T;
- function IsOptional: T; overload;
- function IsOptional(const AExecute: TDataValidatorCustomValue): T; overload;
- function IsPassportNumber(const ALocaleLanguage: TDataValidatorLocaleLanguage = tl_en_US): T;
- function IsPhoneNumber(const ALocaleLanguage: TDataValidatorLocaleLanguage = tl_en_US): T;
- function IsPort: T;
- function IsPositive: T;
- function IsPostalCode(const ALocaleLanguage: TDataValidatorLocaleLanguage = tl_en_US): T;
- function IsRGBColor: T;
- function IsSSN: T;
- function IsTime(const AJSONISO8601ReturnUTC: Boolean = True): T;
- function IsTimeBetween(const AValueA: TTime; const AValueB: TTime; const AJSONISO8601ReturnUTC: Boolean = True): T;
- function IsTimeEquals(const ACompareTime: TTime; const AJSONISO8601ReturnUTC: Boolean = True): T;
- function IsTimeGreaterThan(const ACompareTime: TTime; const AJSONISO8601ReturnUTC: Boolean = True): T;
- function IsTimeLessThan(const ACompareTime: TTime; const AJSONISO8601ReturnUTC: Boolean = True): T;
- function IsUppercase: T;
- function IsURL: T;
- function IsUUID: T;
- function IsUUIDv1: T;
- function IsUUIDv2: T;
- function IsUUIDv3: T;
- function IsUUIDv4: T;
- function IsUUIDv5: T;
- function IsZero: T;
- function RegexIsMatch(const ARegex: string): T;
- function StartsWith(const AValueStartsWith: string; const ACaseSensitive: Boolean = False): T; overload;
- function StartsWith(const AValueStartsWith: TArray; const ACaseSensitive: Boolean = False): T; overload;
-
- function &Not: T;
- end;
-
- IDataValidatorContextSchema = interface(IDataValidatorContextValidator)
- ['{01249950-D03B-4A14-BBE7-DB820FE1917E}']
- function AddSchema(const ASchema: IDataValidatorSchemaContext): T;
- end;
-
- IDataValidatorContext = interface(IDataValidatorContextSchema)
- ['{990209EE-C2A5-4C95-AE82-30277DF40B35}']
- end;
-
- IDataValidatorContextBase = interface(IDataValidatorContext)
- ['{990209EE-C2A5-4C95-AE82-30277DF40B35}']
- function GetItem: TList;
- function GetValue: TValue;
- end;
-
-implementation
-
-end.
diff --git a/src/core/DataValidator.Context.pas b/src/core/DataValidator.Context.pas
index 2026198..9701b93 100644
--- a/src/core/DataValidator.Context.pas
+++ b/src/core/DataValidator.Context.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -36,7 +36,7 @@ interface
uses
DataValidator.Types,
- DataValidator.Context.Intf, DataValidator.ItemBase.Intf,
+ DataValidator.Intf,
System.RTTI, System.JSON, System.Generics.Collections, System.SysUtils, System.Variants;
type
@@ -50,7 +50,7 @@ TDataValidatorContext = class(TInterfacedObject, IDataValidator
FIsNot: Boolean;
protected
FValue: TValue;
- function Add(const AValidatorItem: IDataValidatorItem; const ALocaleLanguage: TDataValidatorLocaleLanguage = tl_en_US; const AModeSchema: Boolean = False): T;
+ function Add(const AValidatorItem: IDataValidatorItem; const ALocaleLanguage: TDataValidatorLocaleLanguage = TDataValidatorLocaleLanguage.tl_en_US; const AModeSchema: Boolean = False): T;
public
// Schema
function AddSchema(const ASchema: IDataValidatorSchemaContext): T;
@@ -63,8 +63,8 @@ TDataValidatorContext = class(TInterfacedObject, IDataValidator
function Contains(const AValueContains: TArray; const ACaseSensitive: Boolean = False): T; overload;
function EndsWith(const AValueEndsWith: string; const ACaseSensitive: Boolean = False): T; overload;
function EndsWith(const AValueEndsWith: TArray; const ACaseSensitive: Boolean = False): T; overload;
- function IsAlpha(const ALocaleLanguage: TDataValidatorLocaleLanguage = tl_en_US): T;
- function IsAlphaNumeric(const ALocaleLanguage: TDataValidatorLocaleLanguage = tl_en_US): T;
+ function IsAlpha(const ALocaleLanguage: TDataValidatorLocaleLanguage = TDataValidatorLocaleLanguage.tl_en_US; const AAllowedCharacters: TArray = []): T;
+ function IsAlphaNumeric(const ALocaleLanguage: TDataValidatorLocaleLanguage = TDataValidatorLocaleLanguage.tl_en_US; const AAllowedCharacters: TArray = []): T;
function IsAscii: T;
function IsBase32: T;
function IsBase58: T;
@@ -123,11 +123,11 @@ TDataValidatorContext = class(TInterfacedObject, IDataValidator
function IsOctal: T;
function IsOptional: T; overload;
function IsOptional(const AExecute: TDataValidatorCustomValue): T; overload;
- function IsPassportNumber(const ALocaleLanguage: TDataValidatorLocaleLanguage = tl_en_US): T;
- function IsPhoneNumber(const ALocaleLanguage: TDataValidatorLocaleLanguage = tl_en_US): T;
+ function IsPassportNumber(const ALocaleLanguage: TDataValidatorLocaleLanguage = TDataValidatorLocaleLanguage.tl_en_US): T;
+ function IsPhoneNumber(const ALocaleLanguage: TDataValidatorLocaleLanguage = TDataValidatorLocaleLanguage.tl_en_US): T;
function IsPort: T;
function IsPositive: T;
- function IsPostalCode(const ALocaleLanguage: TDataValidatorLocaleLanguage = tl_en_US): T;
+ function IsPostalCode(const ALocaleLanguage: TDataValidatorLocaleLanguage = TDataValidatorLocaleLanguage.tl_en_US): T;
function IsRGBColor: T;
function IsSSN: T;
function IsTime(const AJSONISO8601ReturnUTC: Boolean = True): T;
@@ -376,14 +376,14 @@ function TDataValidatorContext.EndsWith(const AValueEndsWith: TArray;
Result := Add(TValidatorEndsWith.Create(AValueEndsWith, ACaseSensitive, Format('Value does not end with %s!', [LMessage])));
end;
-function TDataValidatorContext.IsAlpha(const ALocaleLanguage: TDataValidatorLocaleLanguage): T;
+function TDataValidatorContext.IsAlpha(const ALocaleLanguage: TDataValidatorLocaleLanguage = TDataValidatorLocaleLanguage.tl_en_US; const AAllowedCharacters: TArray = []): T;
begin
- Result := Add(TValidatorIsAlpha.Create('Value is not alpha!'), ALocaleLanguage);
+ Result := Add(TValidatorIsAlpha.Create(AAllowedCharacters, 'Value is not alpha!'), ALocaleLanguage);
end;
-function TDataValidatorContext.IsAlphaNumeric(const ALocaleLanguage: TDataValidatorLocaleLanguage): T;
+function TDataValidatorContext.IsAlphaNumeric(const ALocaleLanguage: TDataValidatorLocaleLanguage = TDataValidatorLocaleLanguage.tl_en_US; const AAllowedCharacters: TArray = []): T;
begin
- Result := Add(TValidatorIsAlphaNumeric.Create('Value is not alphanumeric!'), ALocaleLanguage);
+ Result := Add(TValidatorIsAlphaNumeric.Create(AAllowedCharacters, 'Value is not alphanumeric!'), ALocaleLanguage);
end;
function TDataValidatorContext.IsAscii: T;
@@ -446,7 +446,7 @@ function TDataValidatorContext.IsBTCAddress: T;
Result := Add(TValidatorIsBTCAddress.Create('Value is not BTC (Bitcoin) Adddress!'));
end;
-function TDataValidatorContext.IsPostalCode(const ALocaleLanguage: TDataValidatorLocaleLanguage = tl_en_US): T;
+function TDataValidatorContext.IsPostalCode(const ALocaleLanguage: TDataValidatorLocaleLanguage = TDataValidatorLocaleLanguage.tl_en_US): T;
begin
Result := Add(TValidatorIsPostalCode.Create('Value is not postal code!'), ALocaleLanguage);
end;
diff --git a/src/core/DataValidator.Information.Intf.pas b/src/core/DataValidator.Information.Intf.pas
deleted file mode 100644
index c162411..0000000
--- a/src/core/DataValidator.Information.Intf.pas
+++ /dev/null
@@ -1,64 +0,0 @@
-{
- ********************************************************************************
-
- Github - https://github.com/dliocode/datavalidator
-
- ********************************************************************************
-
- MIT License
-
- Copyright (c) 2021 Danilo Lucas
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-
- ********************************************************************************
-}
-
-unit DataValidator.Information.Intf;
-
-interface
-
-uses
- DataValidator.Types;
-
-type
- IDataValidatorInformation = interface
- ['{972F5617-FDED-4D8E-8F89-5F372C1D62AB}']
- function Value: string;
- function Messages: TDataValidatorMessage;
- function Execute: TDataValidatorInformationExecute;
- procedure OnExecute;
- end;
-
- IDataValidatorInformationsResult = interface
- ['{571983C3-94A1-4FB3-A855-6E5B37BC56C8}']
- function GetItem(const Index: Integer): IDataValidatorInformation;
- function Count: Integer;
- function Message: string;
- end;
-
- IDataValidatorInformations = interface(IDataValidatorInformationsResult)
- ['{8DF2AE1E-860E-4488-8052-4C94E6F1F3A1}']
- function Add(const ADataInformation: IDataValidatorInformation): IDataValidatorInformations; overload;
- function Add(const ADataInformations: IDataValidatorInformations): IDataValidatorInformations; overload;
- end;
-
-implementation
-
-end.
diff --git a/src/core/DataValidator.Information.pas b/src/core/DataValidator.Information.pas
index 2967c15..e836615 100644
--- a/src/core/DataValidator.Information.pas
+++ b/src/core/DataValidator.Information.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -35,7 +35,8 @@
interface
uses
- DataValidator.Information.Intf, DataValidator.Types,
+ DataValidator.Types,
+ DataValidator.Intf,
System.Classes, System.Generics.Collections, System.SysUtils;
type
diff --git a/src/core/DataValidator.Intf.pas b/src/core/DataValidator.Intf.pas
index 6f00cbc..989e9ba 100644
--- a/src/core/DataValidator.Intf.pas
+++ b/src/core/DataValidator.Intf.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -35,9 +35,274 @@
interface
uses
- DataValidator.Context.Intf, DataValidator.Result.Intf, DataValidator.JSON.Context.Intf;
+ DataValidator.Types,
+ System.JSON, System.Generics.Collections, System.Rtti;
type
+ IDataValidatorJSON = interface;
+
+ // Information
+ IDataValidatorInformation = interface
+ ['{972F5617-FDED-4D8E-8F89-5F372C1D62AB}']
+ function Value: string;
+ function Messages: TDataValidatorMessage;
+ function Execute: TDataValidatorInformationExecute;
+ procedure OnExecute;
+ end;
+
+ IDataValidatorInformationsResult = interface
+ ['{571983C3-94A1-4FB3-A855-6E5B37BC56C8}']
+ function GetItem(const Index: Integer): IDataValidatorInformation;
+ function Count: Integer;
+ function Message: string;
+ end;
+
+ IDataValidatorInformations = interface(IDataValidatorInformationsResult)
+ ['{8DF2AE1E-860E-4488-8052-4C94E6F1F3A1}']
+ function Add(const ADataInformation: IDataValidatorInformation): IDataValidatorInformations; overload;
+ function Add(const ADataInformations: IDataValidatorInformations): IDataValidatorInformations; overload;
+ end;
+
+ // Result
+ IDataValidatorResult = interface
+ ['{1527205B-B5F7-4058-B056-53C4F89EC8C9}']
+ function OK: Boolean;
+ function Informations: IDataValidatorInformationsResult;
+ function Values: TArray;
+ end;
+
+ // ItemBase
+ IDataValidatorItemBase = interface
+ ['{7A448738-20D6-439D-868C-F28D135B65D8}']
+ function GetDataValidatorLocaleLanguage: TDataValidatorLocaleLanguage;
+ procedure SetDataValidatorLocaleLanguage(const ALocaleLanguage: TDataValidatorLocaleLanguage = TDataValidatorLocaleLanguage.tl_en_US);
+ procedure SetIsNot(const AIsNot: Boolean);
+
+ procedure SetKey(const AKey: string);
+ procedure SetName(const AName: string);
+ procedure SetValue(const AValue: TValue);
+ procedure SetMessage(const AMessage: string); overload;
+ procedure SetMessage(const AMessage: TDataValidatorMessage); overload;
+ procedure SetExecute(const AExecute: TDataValidatorInformationExecute); overload;
+ end;
+
+ IDataValidatorItem = interface(IDataValidatorItemBase)
+ ['{277F2E2E-BBA1-4823-8DCC-8D4FD399CF02}']
+ function Check: IDataValidatorResult;
+ end;
+
+ IDataSanitizerItem = interface(IDataValidatorItem)
+ ['{0491AB3E-2D23-42AC-9CE8-FBA77C3D253D}']
+ function Sanitize: TValue;
+ end;
+
+ // Context
+ IDataValidatorContextMessage = interface
+ ['{54CF9567-25E9-4B1A-A62B-7F270E5351E2}']
+ function WithMessage(const AMessage: TDataValidatorWithMessage): T; overload;
+ function WithMessage(const AMessage: string): T; overload;
+ function WithMessage(const AMessage: string; const AParams: array of const): T; overload;
+ function Execute(const AExecute: TDataValidatorInformationExecute): T;
+ end;
+
+ IDataValidatorContextSanitizer = interface(IDataValidatorContextMessage)
+ ['{80BCAFBF-2BBB-46FA-9C39-E7CC7D188350}']
+ function CustomSanitizer(const ASanitizerItem: IDataSanitizerItem): T; overload;
+ function CustomSanitizer(const AExecute: TDataValidatorCustomSanitizer): T; overload;
+ function NormalizeEmail(const AAllLowercase: Boolean = True; const AGmailRemoveDots: Boolean = True): T;
+ function OnlyNumbers: T;
+ function RemoveAccents: T;
+ function Replace(const AOldValue: string; const ANewValue: string): T;
+ function ToBase64Decode: T;
+ function ToBase64Encode: T;
+ function ToDate(const AJSONISO8601ReturnUTC: Boolean = True): T;
+ function ToDateTime(const AJSONISO8601ReturnUTC: Boolean = True): T;
+ function ToHTMLDecode: T;
+ function ToHTMLEncode: T;
+ function ToInteger: T;
+ function ToLowerCase: T;
+ function ToMD5: T;
+ function ToNumeric: T;
+ function ToTime(const AJSONISO8601ReturnUTC: Boolean = True): T;
+ function ToUpperCase: T;
+ function ToURLDecode: T;
+ function ToURLEncode: T;
+ function Trim: T;
+ function TrimLeft: T;
+ function TrimRight: T;
+ end;
+
+ IDataValidatorContextValidator = interface(IDataValidatorContextSanitizer)
+ ['{F61EA315-86CA-4807-B1A1-F9030FADB844}']
+ function CustomValue(const ADataItem: IDataValidatorItem): T; overload;
+ function CustomValue(const AExecute: TDataValidatorCustomValue): T; overload;
+ function CustomValue(const AExecute: TDataValidatorCustomValueMessage): T; overload;
+ function CustomValue(const AExecute: TDataValidatorCustomMessage): T; overload;
+ function Contains(const AValueContains: string; const ACaseSensitive: Boolean = False): T; overload;
+ function Contains(const AValueContains: TArray; const ACaseSensitive: Boolean = False): T; overload;
+ function EndsWith(const AValueEndsWith: string; const ACaseSensitive: Boolean = False): T; overload;
+ function EndsWith(const AValueEndsWith: TArray; const ACaseSensitive: Boolean = False): T; overload;
+ function IsAlpha(const ALocaleLanguage: TDataValidatorLocaleLanguage = TDataValidatorLocaleLanguage.tl_en_US; const AAllowedCharacters: TArray = []): T;
+ function IsAlphaNumeric(const ALocaleLanguage: TDataValidatorLocaleLanguage = TDataValidatorLocaleLanguage.tl_en_US; const AAllowedCharacters: TArray = []): T;
+ function IsAscii: T;
+ function IsBase32: T;
+ function IsBase58: T;
+ function IsBase64: T;
+ function IsBetween(const AValueA: Integer; const AValueB: Integer): T; overload;
+ function IsBetween(const AValueA: Int64; const AValueB: Int64): T; overload;
+ function IsBetween(const AValueA: Double; const AValueB: Double): T; overload;
+ function IsBetween(const AValueA: Extended; const AValueB: Extended): T; overload;
+ function IsBetween(const AValueA: Single; const AValueB: Single): T; overload;
+ function IsBetween(const AValueA: UInt64; const AValueB: UInt64): T; overload;
+ function IsBoolean: T;
+ function IsBTCAddress: T;
+ function IsCNPJ: T;
+ function IsCPF: T;
+ function IsCPFCNPJ: T;
+ function IsDate(const AJSONISO8601ReturnUTC: Boolean = True): T;
+ function IsDateBetween(const AValueA: TDate; const AValueB: TDate; const AJSONISO8601ReturnUTC: Boolean = True): T;
+ function IsDateEquals(const ACompareDate: TDate; const AJSONISO8601ReturnUTC: Boolean = True): T;
+ function IsDateGreaterThan(const ACompareDate: TDate; const AJSONISO8601ReturnUTC: Boolean = True): T;
+ function IsDateLessThan(const ACompareDate: TDate; const AJSONISO8601ReturnUTC: Boolean = True): T;
+ function IsDateTime(const AJSONISO8601ReturnUTC: Boolean = True): T;
+ function IsEmail: T;
+ function IsEmpty: T;
+ function IsEquals(const AValueEquals: string; const ACaseSensitive: Boolean = False): T; overload;
+ function IsEquals(const AValueEquals: TArray; const ACaseSensitive: Boolean = False): T; overload;
+ function IsEthereumAddress: T;
+ function IsGreaterThan(const AValueGreaterThan: Integer): T;
+ function IsGTIN: T;
+ function IsGTIN8: T;
+ function IsGTIN12: T;
+ function IsGTIN13: T;
+ function IsGTIN14: T;
+ function IsHexadecimal: T;
+ function IsHexColor: T;
+ function IsInteger: T;
+ function IsIP: T;
+ function IsIPv4: T;
+ function IsIPv6: T;
+ function IsISO8601: T;
+ function IsJSON: T;
+ function IsJSONArray: T;
+ function IsJSONObject: T;
+ function IsJWT: T;
+ function IsLatLong(const ACheckDMS: Boolean = False): T;
+ function IsLength(const AMin: Integer; const AMax: Integer): T;
+ function IsLessThan(const AValueLessThan: Integer): T;
+ function IsLocale: T;
+ function IsLowercase: T;
+ function IsMACAddress: T;
+ function IsMagnetURI: T;
+ function IsMD5: T;
+ function IsMimeType: T;
+ function IsMongoId: T;
+ function IsNegative: T;
+ function IsNumeric: T;
+ function IsOctal: T;
+ function IsOptional: T; overload;
+ function IsOptional(const AExecute: TDataValidatorCustomValue): T; overload;
+ function IsPassportNumber(const ALocaleLanguage: TDataValidatorLocaleLanguage = TDataValidatorLocaleLanguage.tl_en_US): T;
+ function IsPhoneNumber(const ALocaleLanguage: TDataValidatorLocaleLanguage = TDataValidatorLocaleLanguage.tl_en_US): T;
+ function IsPort: T;
+ function IsPositive: T;
+ function IsPostalCode(const ALocaleLanguage: TDataValidatorLocaleLanguage = TDataValidatorLocaleLanguage.tl_en_US): T;
+ function IsRGBColor: T;
+ function IsSSN: T;
+ function IsTime(const AJSONISO8601ReturnUTC: Boolean = True): T;
+ function IsTimeBetween(const AValueA: TTime; const AValueB: TTime; const AJSONISO8601ReturnUTC: Boolean = True): T;
+ function IsTimeEquals(const ACompareTime: TTime; const AJSONISO8601ReturnUTC: Boolean = True): T;
+ function IsTimeGreaterThan(const ACompareTime: TTime; const AJSONISO8601ReturnUTC: Boolean = True): T;
+ function IsTimeLessThan(const ACompareTime: TTime; const AJSONISO8601ReturnUTC: Boolean = True): T;
+ function IsUppercase: T;
+ function IsURL: T;
+ function IsUUID: T;
+ function IsUUIDv1: T;
+ function IsUUIDv2: T;
+ function IsUUIDv3: T;
+ function IsUUIDv4: T;
+ function IsUUIDv5: T;
+ function IsZero: T;
+ function RegexIsMatch(const ARegex: string): T;
+ function StartsWith(const AValueStartsWith: string; const ACaseSensitive: Boolean = False): T; overload;
+ function StartsWith(const AValueStartsWith: TArray; const ACaseSensitive: Boolean = False): T; overload;
+
+ function &Not: T;
+ end;
+
+ // Schema Context
+ IDataValidatorSchemaContext = interface
+ ['{B282DFB4-FDDC-424C-8C76-C8265822C79B}']
+ end;
+
+ IDataValidatorContextSchema = interface(IDataValidatorContextValidator)
+ ['{01249950-D03B-4A14-BBE7-DB820FE1917E}']
+ function AddSchema(const ASchema: IDataValidatorSchemaContext): T;
+ end;
+
+ // ValueContext
+
+ IDataValidatorContext = interface(IDataValidatorContextSchema)
+ ['{990209EE-C2A5-4C95-AE82-30277DF40B35}']
+ end;
+
+ IDataValidatorContextBase = interface(IDataValidatorContext)
+ ['{990209EE-C2A5-4C95-AE82-30277DF40B35}']
+ function GetItem: TList;
+ function GetValue: TValue;
+ end;
+
+
+ // JSONContext
+ IDataValidatorJSONContextKey = interface;
+ IDataValidatorJSONContextValue = interface;
+
+ IDataValidatorJSONContext = interface
+ ['{AA90066C-DB3C-4CDE-8D7E-5CE867FF4073}']
+ function Key: IDataValidatorJSONContextKey;
+ function Value: IDataValidatorJSONContextValue;
+ end;
+
+ IDataValidatorJSONContextKeyContext = interface(IDataValidatorContextMessage < IDataValidatorJSONContextKey < T >> )
+ ['{67057C09-3C02-46C6-A975-FF1037CF8E0B}']
+ end;
+
+ IDataValidatorJSONContextKey = interface(IDataValidatorJSONContextKeyContext)
+ ['{54906AC4-363A-4031-927C-2D007C6279AC}']
+ function &End: T;
+ function IsOptional: IDataValidatorJSONContextKey; overload;
+ function IsOptional(const AExecute: TDataValidatorCustomResult): IDataValidatorJSONContextKey; overload;
+ function IsRequired: IDataValidatorJSONContextKey; overload;
+ function IsRequired(const AExecute: TDataValidatorCustomResult): IDataValidatorJSONContextKey; overload;
+ end;
+
+ IDataValidatorJSONContextValueContext = interface(IDataValidatorContext < IDataValidatorJSONContextValue < T >> )
+ ['{67057C09-3C02-46C6-A975-FF1037CF8E0B}']
+ end;
+
+ TDataValidatorCustomJSONSubValidator = reference to function(const AValue: IDataValidatorJSON): Boolean;
+ TDataValidatorCustomJSONSubValidatorMessage = reference to function(const AValue: IDataValidatorJSON; var AMessage: string): Boolean;
+ TDataValidatorCustomJSONSubMessage = reference to function(const AValue: IDataValidatorJSON; var AMessage: TDataValidatorMessage): Boolean;
+
+ IDataValidatorJSONContextValue = interface(IDataValidatorJSONContextValueContext)
+ ['{320BD31E-810F-4EB6-A8C4-C17CA2C186DB}']
+ function &End: T;
+ function CustomJSONValue(const AExecute: TDataValidatorCustomJSONValue): IDataValidatorJSONContextValue; overload;
+ function CustomJSONValue(const AExecute: TDataValidatorCustomJSONValueMessage): IDataValidatorJSONContextValue; overload;
+ function CustomJSONValue(const AExecute: TDataValidatorCustomJSONMessage): IDataValidatorJSONContextValue; overload;
+ function CustomJSONSubValidator(const AExecute: TDataValidatorCustomJSONSubValidator): IDataValidatorJSONContextValue; overload;
+ function CustomJSONSubValidator(const AExecute: TDataValidatorCustomJSONSubValidatorMessage): IDataValidatorJSONContextValue; overload;
+ function CustomJSONSubValidator(const AExecute: TDataValidatorCustomJSONSubMessage): IDataValidatorJSONContextValue; overload;
+ function IsJSONNull: IDataValidatorJSONContextValue;
+ function IsJSONBoolean: IDataValidatorJSONContextValue;
+ function IsJSONNumeric: IDataValidatorJSONContextValue;
+ function IsJSONString: IDataValidatorJSONContextValue;
+ function JSONMinItems(const AMinItems: Integer): IDataValidatorJSONContextValue;
+ function JSONMaxItems(const AMaxItems: Integer): IDataValidatorJSONContextValue;
+ end;
+
+ // DataValidator
+
// Schema
IDataValidatorSchemaBase = interface;
IDataValidatorSchemaBaseContext = IDataValidatorContext;
@@ -59,8 +324,8 @@ interface
IDataValidatorValue = interface
['{1D7D5CB4-5188-4F45-8878-A0120A9C1EC2}']
- function Validate(const AValue: string): IDataValidatorValueBaseContext; overload;
- function Validate(const AValue: TArray): IDataValidatorValueBaseContext; overload;
+ function Validate(const AValue: string; const AName: string = ''): IDataValidatorValueBaseContext; overload;
+ function Validate(const AValue: TArray; const AName: string = ''): IDataValidatorValueBaseContext; overload;
end;
IDataValidatorValueBase = interface(IDataValidatorValueBaseContext)
@@ -71,12 +336,13 @@ interface
IDataValidatorValueResult = interface(IDataValidatorValue)
['{69331F14-D8A2-4E40-ADB4-D3195C59100E}']
function Check: IDataValidatorResult;
- function CheckAll: IDataValidatorResult;
+ function CheckAll(const ATypeCheck: TDataValidatorCheckAll = TDataValidatorCheckAll.tcAll): IDataValidatorResult;
end;
IDataValidatorValueValues = interface
['{AE29455D-802F-4527-9E17-546A28091809}']
function GetValues: TArray;
+ function GetName: string;
end;
// JSON
@@ -86,8 +352,8 @@ interface
IDataValidatorJSON = interface
['{8409957E-995E-40F6-99F4-6867EEEA2E78}']
- function Validate(const AName: TArray): IDataValidatorJSONBaseContext; overload;
- function Validate(const AName: string): IDataValidatorJSONBaseContext; overload;
+ function Validate(const AKey: TArray; const AName: string = ''): IDataValidatorJSONBaseContext; overload;
+ function Validate(const AKey: string; const AName: string = ''): IDataValidatorJSONBaseContext; overload;
end;
IDataValidatorJSONBase = interface(IDataValidatorJSONBaseContext)
@@ -98,9 +364,15 @@ interface
IDataValidatorJSONResult = interface(IDataValidatorJSON)
['{69331F14-D8A2-4E40-ADB4-D3195C59100E}']
function Check: IDataValidatorResult;
- function CheckAll: IDataValidatorResult;
- function CheckItem(const AName: string): IDataValidatorResult;
- function CheckItemAll(const AName: string): IDataValidatorResult;
+ function CheckAll(const ATypeCheck: TDataValidatorCheckAll = TDataValidatorCheckAll.tcAll): IDataValidatorResult;
+
+ function CheckItem(const AKey: string): IDataValidatorResult;
+ function CheckItemAll(const AKey: string): IDataValidatorResult;
+ end;
+
+ IDataValidatorJSONValues = interface
+ ['{A7C6C273-713D-46C1-9320-2417BA7FE636}']
+ function GetName: string;
end;
implementation
diff --git a/src/core/DataValidator.ItemBase.Intf.pas b/src/core/DataValidator.ItemBase.Intf.pas
deleted file mode 100644
index eff98e8..0000000
--- a/src/core/DataValidator.ItemBase.Intf.pas
+++ /dev/null
@@ -1,67 +0,0 @@
-{
- ********************************************************************************
-
- Github - https://github.com/dliocode/datavalidator
-
- ********************************************************************************
-
- MIT License
-
- Copyright (c) 2021 Danilo Lucas
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-
- ********************************************************************************
-}
-
-unit DataValidator.ItemBase.Intf;
-
-interface
-
-uses
- DataValidator.Types, DataValidator.Result.Intf,
- System.RTTI;
-
-type
- IDataValidatorItemBase = interface
- ['{7A448738-20D6-439D-868C-F28D135B65D8}']
- function GetDataValidatorLocaleLanguage: TDataValidatorLocaleLanguage;
- procedure SetDataValidatorLocaleLanguage(const ALocaleLanguage: TDataValidatorLocaleLanguage = tl_en_US);
- procedure SetIsNot(const AIsNot: Boolean);
-
- procedure SetName(const AName: string);
- procedure SetValue(const AValue: TValue);
- procedure SetMessage(const AMessage: string); overload;
- procedure SetMessage(const AMessage: TDataValidatorMessage); overload;
- procedure SetExecute(const AExecute: TDataValidatorInformationExecute); overload;
- end;
-
- IDataValidatorItem = interface(IDataValidatorItemBase)
- ['{277F2E2E-BBA1-4823-8DCC-8D4FD399CF02}']
- function Check: IDataValidatorResult;
- end;
-
- IDataSanitizerItem = interface(IDataValidatorItem)
- ['{0491AB3E-2D23-42AC-9CE8-FBA77C3D253D}']
- function Sanitize: TValue;
- end;
-
-implementation
-
-end.
diff --git a/src/core/DataValidator.ItemBase.Sanitizer.pas b/src/core/DataValidator.ItemBase.Sanitizer.pas
index e5d9327..1823be7 100644
--- a/src/core/DataValidator.ItemBase.Sanitizer.pas
+++ b/src/core/DataValidator.ItemBase.Sanitizer.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -35,13 +35,15 @@
interface
uses
- DataValidator.ItemBase.Intf, DataValidator.ItemBase, DataValidator.Result.Intf, DataValidator.Result, DataValidator.Information;
+ DataValidator.Intf,
+ DataValidator.ItemBase, DataValidator.Information;
type
TValue = DataValidator.ItemBase.TValue;
- IDataValidatorResult = DataValidator.Result.Intf.IDataValidatorResult;
- IDataSanitizerItem = DataValidator.ItemBase.Intf.IDataSanitizerItem;
- TDataValidatorResult = DataValidator.Result.TDataValidatorResult;
+
+ IDataValidatorResult = DataValidator.Intf.IDataValidatorResult;
+ IDataSanitizerItem = DataValidator.Intf.IDataSanitizerItem;
+
TDataValidatorInformation = DataValidator.Information.TDataValidatorInformation;
TDataValidatorItemBaseSanitizer = class(TDataValidatorItemBase, IDataSanitizerItem)
diff --git a/src/core/DataValidator.ItemBase.pas b/src/core/DataValidator.ItemBase.pas
index e3c9f82..ea990c1 100644
--- a/src/core/DataValidator.ItemBase.pas
+++ b/src/core/DataValidator.ItemBase.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -36,7 +36,7 @@ interface
uses
DataValidator.Types,
- DataValidator.ItemBase.Intf, DataValidator.Result.Intf,
+ DataValidator.Intf,
DataValidator.Result, DataValidator.Information,
System.SysUtils, System.RTTI, System.JSON, System.StrUtils, System.TypInfo;
@@ -57,18 +57,19 @@ interface
TDataValidatorCustomJSONMessage = DataValidator.Types.TDataValidatorCustomJSONMessage;
TDataValidatorInformationExecute = DataValidator.Types.TDataValidatorInformationExecute;
- IDataValidatorItem = DataValidator.ItemBase.Intf.IDataValidatorItem;
- IDataValidatorResult = DataValidator.Result.Intf.IDataValidatorResult;
+ IDataValidatorItem = DataValidator.Intf.IDataValidatorItem;
+ IDataValidatorResult = DataValidator.Intf.IDataValidatorResult;
TDataValidatorResult = DataValidator.Result.TDataValidatorResult;
TDataValidatorInformation = DataValidator.Information.TDataValidatorInformation;
TDataValidatorItemBase = class(TInterfacedObject, IDataValidatorItemBase)
private
FMessage: TDataValidatorMessage;
- function GetAdjustedMessage(const AMessage: string): string;
+ function GetAdjustedMessage(const AMessage: string; const AValue: string): string;
protected
FLocaleLanguage: TDataValidatorLocaleLanguage;
FIsNot: Boolean;
+ FKey: string;
FName: string;
FValue: TValue;
FExecute: TDataValidatorInformationExecute;
@@ -78,8 +79,9 @@ TDataValidatorItemBase = class(TInterfacedObject, IDataValidatorItemBase)
procedure SetValueAdapter(const AValue: TValue);
public
function GetDataValidatorLocaleLanguage: TDataValidatorLocaleLanguage;
- procedure SetDataValidatorLocaleLanguage(const ALocaleLanguage: TDataValidatorLocaleLanguage = tl_en_US);
+ procedure SetDataValidatorLocaleLanguage(const ALocaleLanguage: TDataValidatorLocaleLanguage = TDataValidatorLocaleLanguage.tl_en_US);
procedure SetIsNot(const AIsNot: Boolean);
+ procedure SetKey(const AKey: string);
procedure SetName(const AName: string);
procedure SetValue(const AValue: TValue);
procedure SetMessage(const AMessage: string); overload;
@@ -96,11 +98,16 @@ function TDataValidatorItemBase.GetDataValidatorLocaleLanguage: TDataValidatorLo
Result := FLocaleLanguage;
end;
-procedure TDataValidatorItemBase.SetDataValidatorLocaleLanguage(const ALocaleLanguage: TDataValidatorLocaleLanguage = tl_en_US);
+procedure TDataValidatorItemBase.SetDataValidatorLocaleLanguage(const ALocaleLanguage: TDataValidatorLocaleLanguage = TDataValidatorLocaleLanguage.tl_en_US);
begin
FLocaleLanguage := ALocaleLanguage;
end;
+procedure TDataValidatorItemBase.SetKey(const AKey: string);
+begin
+ FKey := AKey;
+end;
+
procedure TDataValidatorItemBase.SetName(const AName: string);
begin
FName := AName;
@@ -133,11 +140,23 @@ procedure TDataValidatorItemBase.SetMessage(const AMessage: TDataValidatorMessag
if not AMessage.Description.Trim.IsEmpty then
FMessage.Description := AMessage.Description;
- if not AMessage.Status.Trim.IsEmpty then
- FMessage.Status := AMessage.Status;
+ if not AMessage.Solution.Trim.IsEmpty then
+ FMessage.Solution := AMessage.Solution;
+
+ if not AMessage.Source.Trim.IsEmpty then
+ FMessage.Source := AMessage.Source;
+
+ if not AMessage.Code.Trim.IsEmpty then
+ FMessage.Code := AMessage.Code;
+
+ if not AMessage.CodeName.Trim.IsEmpty then
+ FMessage.CodeName := AMessage.CodeName;
if not AMessage.Uri.Trim.IsEmpty then
FMessage.Uri := AMessage.Uri;
+
+ if not AMessage.Data.Trim.IsEmpty then
+ FMessage.Data := AMessage.Data;
end;
procedure TDataValidatorItemBase.SetExecute(const AExecute: TDataValidatorInformationExecute);
@@ -146,15 +165,23 @@ procedure TDataValidatorItemBase.SetExecute(const AExecute: TDataValidatorInform
end;
function TDataValidatorItemBase.GetMessage: TDataValidatorMessage;
+var
+ LValue: string;
begin
+ LValue := GetValueAsString;
+
Result := Default (TDataValidatorMessage);
Result := FMessage;
- Result.Title := GetAdjustedMessage(Result.Title);
- Result.Message := GetAdjustedMessage(Result.Message);
- Result.Description := GetAdjustedMessage(Result.Description);
- Result.Status := GetAdjustedMessage(Result.Status);
- Result.Uri := GetAdjustedMessage(Result.Uri);
+ Result.Title := GetAdjustedMessage(Result.Title, LValue);
+ Result.Message := GetAdjustedMessage(Result.Message, LValue);
+ Result.Description := GetAdjustedMessage(Result.Description, LValue);
+ Result.Solution := GetAdjustedMessage(Result.Solution, LValue);
+ Result.Source := GetAdjustedMessage(Result.Source, LValue);
+ Result.Code := GetAdjustedMessage(Result.Code, LValue);
+ Result.CodeName := GetAdjustedMessage(Result.CodeName, LValue);
+ Result.Uri := GetAdjustedMessage(Result.Uri, LValue);
+ Result.Data := GetAdjustedMessage(Result.Data, LValue);
end;
function TDataValidatorItemBase.GetValueAsString: string;
@@ -182,6 +209,7 @@ function TDataValidatorItemBase.GetValueAsString: string;
procedure TDataValidatorItemBase.SetValueAdapter(const AValue: TValue);
var
LJSONPair: TJSONPair;
+ LFloat: Double;
begin
if FValue.IsType then
begin
@@ -189,33 +217,43 @@ procedure TDataValidatorItemBase.SetValueAdapter(const AValue: TValue);
if Assigned(LJSONPair) then
begin
- if LJSONPair.JsonValue is TJSONString then
- if not MatchText(string(AValue.TypeInfo.Name), ['TDateTime', 'TDate', 'TTime', 'TTimeStamp']) then
- FValue.AsType.JsonValue := TJSONString.Create(AValue.AsString);
-
- Exit;
+ if LJSONPair.JsonValue is TJSONNumber then
+ begin
+ if TryStrToFloat(AValue.AsString, LFloat) then
+ LJSONPair.JsonValue := TJSONNumber.Create(AValue.AsString)
+ else
+ LJSONPair.JsonValue := TJSONString.Create(AValue.AsString);
+ end
+ else
+ if LJSONPair.JsonValue is TJSONString then
+ if not MatchText(string(AValue.TypeInfo.Name), ['TDateTime', 'TDate', 'TTime', 'TTimeStamp']) then
+ LJSONPair.JsonValue := TJSONString.Create(AValue.AsString);
end;
- end;
-
- FValue := AValue;
+ end
+ else
+ FValue := AValue;
end;
-function TDataValidatorItemBase.GetAdjustedMessage(const AMessage: string): string;
+function TDataValidatorItemBase.GetAdjustedMessage(const AMessage: string; const AValue: string): string;
var
- LKey: string;
- LValue: string;
LMessage: string;
begin
- LKey := FName;
- LValue := GetValueAsString;
+ if FName.Trim.IsEmpty then
+ FName := FKey;
LMessage := AMessage;
- LMessage := LMessage.Replace('${key}', LKey, [rfReplaceAll, rfIgnoreCase]);
- LMessage := LMessage.Replace('${keyupper}', UpperCase(LKey), [rfReplaceAll, rfIgnoreCase]);
- LMessage := LMessage.Replace('${keylower}', LowerCase(LKey), [rfReplaceAll, rfIgnoreCase]);
- LMessage := LMessage.Replace('${value}', LValue, [rfReplaceAll, rfIgnoreCase]);
- LMessage := LMessage.Replace('${valueupper}', UpperCase(LValue), [rfReplaceAll, rfIgnoreCase]);
- LMessage := LMessage.Replace('${valuelower}', LowerCase(LValue), [rfReplaceAll, rfIgnoreCase]);
+
+ LMessage := LMessage.Replace('${name}', FName, [rfReplaceAll, rfIgnoreCase]);
+ LMessage := LMessage.Replace('${nameupper}', UpperCase(FName), [rfReplaceAll, rfIgnoreCase]);
+ LMessage := LMessage.Replace('${namelower}', LowerCase(FName), [rfReplaceAll, rfIgnoreCase]);
+
+ LMessage := LMessage.Replace('${key}', FKey, [rfReplaceAll, rfIgnoreCase]);
+ LMessage := LMessage.Replace('${keyupper}', UpperCase(FKey), [rfReplaceAll, rfIgnoreCase]);
+ LMessage := LMessage.Replace('${keylower}', LowerCase(FKey), [rfReplaceAll, rfIgnoreCase]);
+
+ LMessage := LMessage.Replace('${value}', AValue, [rfReplaceAll, rfIgnoreCase]);
+ LMessage := LMessage.Replace('${valueupper}', UpperCase(AValue), [rfReplaceAll, rfIgnoreCase]);
+ LMessage := LMessage.Replace('${valuelower}', LowerCase(AValue), [rfReplaceAll, rfIgnoreCase]);
Result := LMessage;
end;
diff --git a/src/core/DataValidator.JSON.Base.pas b/src/core/DataValidator.JSON.Base.pas
index bb22cbb..7f5693a 100644
--- a/src/core/DataValidator.JSON.Base.pas
+++ b/src/core/DataValidator.JSON.Base.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -35,28 +35,33 @@
interface
uses
- DataValidator.Intf, DataValidator.JSON.Context,
- System.JSON;
+ DataValidator.Intf,
+ DataValidator.JSON.Context,
+ System.SysUtils, System.JSON;
type
- TDataValidatorJSONBase = class(TDataValidatorJSONContext, IDataValidatorJSONBase)
+ TDataValidatorJSONBase = class(TDataValidatorJSONContext, IDataValidatorJSONBase, IDataValidatorJSONValues)
private
[weak]
FResult: IDataValidatorJSONResult;
+ FName: string;
public
function &End: IDataValidatorJSONResult;
+ function GetName: string;
- constructor Create(const AResult: IDataValidatorJSONResult; const AValue: TJSONPair); reintroduce;
+ constructor Create(const AResult: IDataValidatorJSONResult; const AValue: TJSONPair; const AName: string = ''); reintroduce;
end;
implementation
{ TDataValidatorJSONBase }
-constructor TDataValidatorJSONBase.Create(const AResult: IDataValidatorJSONResult; const AValue: TJSONPair);
+constructor TDataValidatorJSONBase.Create(const AResult: IDataValidatorJSONResult; const AValue: TJSONPair; const AName: string = '');
begin
inherited Create(Self, AValue);
+
FResult := AResult;
+ FName := AName;
end;
function TDataValidatorJSONBase.&End: IDataValidatorJSONResult;
@@ -64,4 +69,9 @@ function TDataValidatorJSONBase.&End: IDataValidatorJSONResult;
Result := FResult;
end;
+function TDataValidatorJSONBase.GetName: string;
+begin
+ Result := FName;
+end;
+
end.
diff --git a/src/core/DataValidator.JSON.Context.Intf.pas b/src/core/DataValidator.JSON.Context.Intf.pas
deleted file mode 100644
index 0d682c6..0000000
--- a/src/core/DataValidator.JSON.Context.Intf.pas
+++ /dev/null
@@ -1,80 +0,0 @@
-{
- ********************************************************************************
-
- Github - https://github.com/dliocode/datavalidator
-
- ********************************************************************************
-
- MIT License
-
- Copyright (c) 2021 Danilo Lucas
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-
- ********************************************************************************
-}
-
-unit DataValidator.JSON.Context.Intf;
-
-interface
-
-uses
- DataValidator.Context.Intf, DataValidator.Types;
-
-type
- IDataValidatorJSONContextKey = interface;
- IDataValidatorJSONContextValue = interface;
-
- IDataValidatorJSONContext = interface
- ['{AA90066C-DB3C-4CDE-8D7E-5CE867FF4073}']
- function Key: IDataValidatorJSONContextKey;
- function Value: IDataValidatorJSONContextValue;
- end;
-
- IDataValidatorJSONContextKeyContext = interface(IDataValidatorContextMessage < IDataValidatorJSONContextKey < T >> )
- ['{67057C09-3C02-46C6-A975-FF1037CF8E0B}']
- end;
-
- IDataValidatorJSONContextKey = interface(IDataValidatorJSONContextKeyContext)
- ['{54906AC4-363A-4031-927C-2D007C6279AC}']
- function &End: T;
- function IsOptional: IDataValidatorJSONContextKey; overload;
- function IsOptional(const AExecute: TDataValidatorCustomResult): IDataValidatorJSONContextKey; overload;
- function IsRequired: IDataValidatorJSONContextKey; overload;
- function IsRequired(const AExecute: TDataValidatorCustomResult): IDataValidatorJSONContextKey; overload;
- end;
-
- IDataValidatorJSONContextValueContext = interface(IDataValidatorContext < IDataValidatorJSONContextValue < T >> )
- ['{67057C09-3C02-46C6-A975-FF1037CF8E0B}']
- end;
-
- IDataValidatorJSONContextValue = interface(IDataValidatorJSONContextValueContext)
- ['{320BD31E-810F-4EB6-A8C4-C17CA2C186DB}']
- function &End: T;
- function CustomJSONValue(const AExecute: TDataValidatorCustomJSONValue): IDataValidatorJSONContextValue; overload;
- function CustomJSONValue(const AExecute: TDataValidatorCustomJSONValueMessage): IDataValidatorJSONContextValue; overload;
- function CustomJSONValue(const AExecute: TDataValidatorCustomJSONMessage): IDataValidatorJSONContextValue; overload;
- function IsNull: IDataValidatorJSONContextValue;
- function MinItems(const AMinItems: Integer): IDataValidatorJSONContextValue;
- function MaxItems(const AMaxItems: Integer): IDataValidatorJSONContextValue;
- end;
-
-implementation
-
-end.
diff --git a/src/core/DataValidator.JSON.Context.pas b/src/core/DataValidator.JSON.Context.pas
index 3bcbd9d..4a7c3fe 100644
--- a/src/core/DataValidator.JSON.Context.pas
+++ b/src/core/DataValidator.JSON.Context.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -35,8 +35,8 @@
interface
uses
- DataValidator.JSON.Context.Intf, DataValidator.ItemBase.Intf,
- DataValidator.Types, DataValidator.Context,
+ DataValidator.Types,
+ DataValidator.Intf, DataValidator.Context,
System.JSON, System.Generics.Collections, System.SysUtils;
type
@@ -63,9 +63,17 @@ TDataValidatorJSONContext = class(TDataValidatorContext; overload;
function CustomJSONValue(const AExecute: TDataValidatorCustomJSONValueMessage): IDataValidatorJSONContextValue; overload;
function CustomJSONValue(const AExecute: TDataValidatorCustomJSONMessage): IDataValidatorJSONContextValue; overload;
- function IsNull: IDataValidatorJSONContextValue;
- function MinItems(const AMinItems: Integer): IDataValidatorJSONContextValue;
- function MaxItems(const AMaxItems: Integer): IDataValidatorJSONContextValue;
+ function CustomJSONSubValidator(const AExecute: TDataValidatorCustomJSONSubValidator): IDataValidatorJSONContextValue; overload;
+ function CustomJSONSubValidator(const AExecute: TDataValidatorCustomJSONSubValidatorMessage): IDataValidatorJSONContextValue; overload;
+ function CustomJSONSubValidator(const AExecute: TDataValidatorCustomJSONSubMessage): IDataValidatorJSONContextValue; overload;
+
+ function IsJSONNull: IDataValidatorJSONContextValue;
+ function IsJSONBoolean: IDataValidatorJSONContextValue;
+ function IsJSONNumeric: IDataValidatorJSONContextValue;
+ function IsJSONString: IDataValidatorJSONContextValue;
+
+ function JSONMinItems(const AMinItems: Integer): IDataValidatorJSONContextValue;
+ function JSONMaxItems(const AMaxItems: Integer): IDataValidatorJSONContextValue;
function &End: T;
@@ -77,10 +85,10 @@ implementation
uses
Validator.JSON.Key.IsOptional,
Validator.JSON.Key.IsRequired,
+ Validator.JSON.SubValidator.Custom,
Validator.JSON.Value.Custom,
- Validator.JSON.Value.IsNull,
- Validator.JSON.Value.MinItems,
- Validator.JSON.Value.MaxItems;
+ Validator.JSON.Value.IsJSONValue,
+ Validator.JSON.Value.IsMinMaxItems;
{ TDataValidatorJSONContext }
@@ -164,25 +172,61 @@ function TDataValidatorJSONContext.CustomJSONValue(const AExecute: TDataValid
function TDataValidatorJSONContext.CustomJSONValue(const AExecute: TDataValidatorCustomJSONMessage): IDataValidatorJSONContextValue;
begin
Result := Self;
- Add(TValidatorJSONValueCustom.Create(nil, nil, AExecute, 'Value is false!'));
+ Add(TValidatorJSONValueCustom.Create(nil, nil, AExecute, 'Value is false!'));
+end;
+
+function TDataValidatorJSONContext.CustomJSONSubValidator(const AExecute: TDataValidatorCustomJSONSubValidator): IDataValidatorJSONContextValue;
+begin
+ Result := Self;
+ Add(TValidatorJSONSubValidatorCustom.Create(AExecute, nil, nil, 'Value is false!'));
+end;
+
+function TDataValidatorJSONContext.CustomJSONSubValidator(const AExecute: TDataValidatorCustomJSONSubValidatorMessage): IDataValidatorJSONContextValue;
+begin
+ Result := Self;
+ Add(TValidatorJSONSubValidatorCustom.Create(nil, AExecute, nil, 'Value is false!'));
+end;
+
+function TDataValidatorJSONContext.CustomJSONSubValidator(const AExecute: TDataValidatorCustomJSONSubMessage): IDataValidatorJSONContextValue;
+begin
+ Result := Self;
+ Add(TValidatorJSONSubValidatorCustom.Create(nil, nil, AExecute, 'Value is false!'));
+end;
+
+function TDataValidatorJSONContext.IsJSONNull: IDataValidatorJSONContextValue;
+begin
+ Result := Self;
+ Add(TDataValidatorJSONValueIsJSONValue.Create(TTypeJSONValue.tjNull, 'Value not is null!'));
+end;
+
+function TDataValidatorJSONContext.IsJSONBoolean: IDataValidatorJSONContextValue;
+begin
+ Result := Self;
+ Add(TDataValidatorJSONValueIsJSONValue.Create(TTypeJSONValue.tjBoolean, 'Value not is boolean!'));
+end;
+
+function TDataValidatorJSONContext.IsJSONNumeric: IDataValidatorJSONContextValue;
+begin
+ Result := Self;
+ Add(TDataValidatorJSONValueIsJSONValue.Create(TTypeJSONValue.tjNumeric, 'Value not is numeric!'));
end;
-function TDataValidatorJSONContext.IsNull: IDataValidatorJSONContextValue;
+function TDataValidatorJSONContext.IsJSONString: IDataValidatorJSONContextValue;
begin
Result := Self;
- Add(TDataValidatorJSONValueIsNull.Create('Value not is null!'));
+ Add(TDataValidatorJSONValueIsJSONValue.Create(TTypeJSONValue.tjString, 'Value not is string!'));
end;
-function TDataValidatorJSONContext.MinItems(const AMinItems: Integer): IDataValidatorJSONContextValue;
+function TDataValidatorJSONContext.JSONMinItems(const AMinItems: Integer): IDataValidatorJSONContextValue;
begin
Result := Self;
- Add(TDataValidatorJSONValueMinItems.Create(AMinItems, Format('Its size is less than %d!', [AMinItems])));
+ Add(TDataValidatorJSONValueIsMinMaxItems.Create(TTypeJSONValueMinMax.tmMin, AMinItems, Format('Its size is less than %d!', [AMinItems])));
end;
-function TDataValidatorJSONContext.MaxItems(const AMaxItems: Integer): IDataValidatorJSONContextValue;
+function TDataValidatorJSONContext.JSONMaxItems(const AMaxItems: Integer): IDataValidatorJSONContextValue;
begin
Result := Self;
- Add(TDataValidatorJSONValueMaxItems.Create(AMaxItems, Format('Its size is greater than %d!', [AMaxItems])));
+ Add(TDataValidatorJSONValueIsMinMaxItems.Create(TTypeJSONValueMinMax.tmMax, AMaxItems, Format('Its size is greater than %d!', [AMaxItems])));
end;
function TDataValidatorJSONContext.&End: T;
diff --git a/src/core/DataValidator.JSON.pas b/src/core/DataValidator.JSON.pas
index 36849b3..bb53d13 100644
--- a/src/core/DataValidator.JSON.pas
+++ b/src/core/DataValidator.JSON.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -35,7 +35,8 @@
interface
uses
- DataValidator.Intf, DataValidator.Result.Intf,
+ DataValidator.Types,
+ DataValidator.Intf,
System.Generics.Collections, System.Rtti, System.JSON, System.SysUtils;
type
@@ -44,35 +45,42 @@ TDataValidatorJSON = class(TInterfacedObject, IDataValidatorJSON, IDataValidat
FJSON: TJSONValue;
FList: TList>;
- function CheckValueArray(const ACheckAll: Boolean): IDataValidatorResult;
- function CheckValueObject(const ACheckAll: Boolean): IDataValidatorResult;
+ function CheckValueArray(const ACheckAll: Boolean; const ATypeCheck: TDataValidatorCheckAll = TDataValidatorCheckAll.tcAll): IDataValidatorResult;
+ function CheckValueObject(const ACheckAll: Boolean; const ATypeCheck: TDataValidatorCheckAll = TDataValidatorCheckAll.tcAll): IDataValidatorResult;
- function CheckItemValueArray(const AName: string; const ACheckAll: Boolean): IDataValidatorResult;
- function CheckItemValueObject(const AName: string; const ACheckAll: Boolean): IDataValidatorResult;
+ function CheckItemValueArray(const AKey: string; const ACheckAll: Boolean): IDataValidatorResult;
+ function CheckItemValueObject(const AKey: string; const ACheckAll: Boolean): IDataValidatorResult;
function TValueToString(const AValue: TValue): string;
- function TryGetValue(const AName: string; var AValue: IDataValidatorJSONBaseContext): Boolean;
+ function TryGetValue(const AKey: string; var AValue: IDataValidatorJSONBaseContext): Boolean;
public
- function Validate(const AName: TArray): IDataValidatorJSONBaseContext; overload;
- function Validate(const AName: string): IDataValidatorJSONBaseContext; overload;
+ function Validate(const AKey: TArray; const AName: string = ''): IDataValidatorJSONBaseContext; overload;
+ function Validate(const AKey: string; const AName: string = ''): IDataValidatorJSONBaseContext; overload;
function Check: IDataValidatorResult;
- function CheckAll: IDataValidatorResult;
- function CheckItem(const AName: string): IDataValidatorResult;
- function CheckItemAll(const AName: string): IDataValidatorResult;
+ function CheckAll(const ATypeCheck: TDataValidatorCheckAll = TDataValidatorCheckAll.tcAll): IDataValidatorResult;
+
+ function CheckItem(const AKey: string): IDataValidatorResult;
+ function CheckItemAll(const AKey: string): IDataValidatorResult;
constructor Create(const AJSON: TJSONObject); overload;
constructor Create(const AJSON: TJSONArray); overload;
+ constructor Create(const AJSON: TJSONValue); overload;
destructor Destroy; override;
end;
implementation
uses
- DataValidator.Types,
- DataValidator.Information.Intf, DataValidator.ItemBase.Intf, DataValidator.Context.Intf,
- DataValidator.JSON.Base, DataValidator.Information, DataValidator.ItemBase.Sanitizer, DataValidator.ItemBase,
- Validator.JSON.Key.IsRequired, Validator.JSON.Key.IsOptional, Validator.IsOptional;
+ DataValidator.JSON.Base,
+
+ DataValidator.Information,
+ DataValidator.ItemBase.Sanitizer,
+ DataValidator.ItemBase,
+
+ Validator.JSON.Key.IsRequired,
+ Validator.JSON.Key.IsOptional,
+ Validator.IsOptional;
{ TDataValidatorJSON }
@@ -94,27 +102,38 @@ constructor TDataValidatorJSON.Create(const AJSON: TJSONArray);
FList := TList < TPair < string, IDataValidatorJSONBaseContext >>.Create();
end;
+constructor TDataValidatorJSON.Create(const AJSON: TJSONValue);
+begin
+ if AJSON is TJSONObject then
+ Create(AJSON as TJSONObject)
+ else
+ if AJSON is TJSONArray then
+ Create(AJSON as TJSONArray)
+ else
+ raise EDataValidatorException.Create('JSON invalid!');
+end;
+
destructor TDataValidatorJSON.Destroy;
begin
FList.Free;
end;
-function TDataValidatorJSON.Validate(const AName: TArray): IDataValidatorJSONBaseContext;
+function TDataValidatorJSON.Validate(const AKey: TArray; const AName: string = ''): IDataValidatorJSONBaseContext;
var
LBase: IDataValidatorJSONBaseContext;
I: Integer;
begin
- LBase := TDataValidatorJSONBase.Create(Self, nil);
+ LBase := TDataValidatorJSONBase.Create(Self, nil, AName);
- for I := Low(AName) to High(AName) do
- FList.Add(TPair.Create(AName[I], LBase));
+ for I := Low(AKey) to High(AKey) do
+ FList.Add(TPair.Create(AKey[I], LBase));
Result := LBase;
end;
-function TDataValidatorJSON.Validate(const AName: string): IDataValidatorJSONBaseContext;
+function TDataValidatorJSON.Validate(const AKey: string; const AName: string = ''): IDataValidatorJSONBaseContext;
begin
- Result := Validate([AName]);
+ Result := Validate([AKey], AName);
end;
function TDataValidatorJSON.Check: IDataValidatorResult;
@@ -126,34 +145,34 @@ function TDataValidatorJSON.Check: IDataValidatorResult;
Result := CheckValueArray(False);
end;
-function TDataValidatorJSON.CheckAll: IDataValidatorResult;
+function TDataValidatorJSON.CheckAll(const ATypeCheck: TDataValidatorCheckAll = TDataValidatorCheckAll.tcAll): IDataValidatorResult;
begin
if FJSON is TJSONObject then
- Result := CheckValueObject(True)
+ Result := CheckValueObject(True, ATypeCheck)
else
if FJSON is TJSONArray then
- Result := CheckValueArray(True);
+ Result := CheckValueArray(True, ATypeCheck);
end;
-function TDataValidatorJSON.CheckItem(const AName: string): IDataValidatorResult;
+function TDataValidatorJSON.CheckItem(const AKey: string): IDataValidatorResult;
begin
if FJSON is TJSONObject then
- Result := CheckItemValueObject(AName, False)
+ Result := CheckItemValueObject(AKey, False)
else
if FJSON is TJSONArray then
- Result := CheckItemValueArray(AName, False);
+ Result := CheckItemValueArray(AKey, False);
end;
-function TDataValidatorJSON.CheckItemAll(const AName: string): IDataValidatorResult;
+function TDataValidatorJSON.CheckItemAll(const AKey: string): IDataValidatorResult;
begin
if FJSON is TJSONObject then
- Result := CheckItemValueObject(AName, True)
+ Result := CheckItemValueObject(AKey, True)
else
if FJSON is TJSONArray then
- Result := CheckItemValueArray(AName, True);
+ Result := CheckItemValueArray(AKey, True);
end;
-function TDataValidatorJSON.CheckValueObject(const ACheckAll: Boolean): IDataValidatorResult;
+function TDataValidatorJSON.CheckValueObject(const ACheckAll: Boolean; const ATypeCheck: TDataValidatorCheckAll = TDataValidatorCheckAll.tcAll): IDataValidatorResult;
var
LOK: Boolean;
LInfo: IDataValidatorInformations;
@@ -172,24 +191,25 @@ function TDataValidatorJSON.CheckValueObject(const ACheckAll: Boolean): IDataVal
for Enum in FList do
begin
LListValidatorItem := (Enum.Value as IDataValidatorContextBase).GetItem;
- LName := Enum.Key;
- LValueSanitizer := TValue.From((FJSON as TJSONObject).Get(LName));
+ LName := (Enum.Value as IDataValidatorJSONValues).GetName;
+
+ LValueSanitizer := TValue.From((FJSON as TJSONObject).Get(Enum.Key));
for I := 0 to Pred(LListValidatorItem.Count) do
begin
LValidatorItem := LListValidatorItem.Items[I];
+ LValidatorItem.SetKey(Enum.Key);
+ LValidatorItem.SetName(LName);
+ LValidatorItem.SetValue(LValueSanitizer);
+
if (LValidatorItem is TDataValidatorItemBaseSanitizer) then
begin
- LValidatorItem.SetValue(LValueSanitizer);
LValueSanitizer := (LValidatorItem as TDataValidatorItemBaseSanitizer).Sanitize;
Continue;
end;
- LValidatorItem.SetName(LName);
- LValidatorItem.SetValue(LValueSanitizer);
-
LValidatorResult := LValidatorItem.Check;
if not LValidatorResult.OK then
@@ -204,7 +224,10 @@ function TDataValidatorJSON.CheckValueObject(const ACheckAll: Boolean): IDataVal
Break;
if not ACheckAll then
- Break;
+ Break
+ else
+ if ATypeCheck = TDataValidatorCheckAll.tcFirst then
+ Break;
end
else
if (LValidatorItem is TDataValidatorJSONKeyIsOptional) or (LValidatorItem is TValidatorIsOptional) then
@@ -221,7 +244,7 @@ function TDataValidatorJSON.CheckValueObject(const ACheckAll: Boolean): IDataVal
Result := TDataValidatorResult.Create(LOK, LInfo, LValues);
end;
-function TDataValidatorJSON.CheckValueArray(const ACheckAll: Boolean): IDataValidatorResult;
+function TDataValidatorJSON.CheckValueArray(const ACheckAll: Boolean; const ATypeCheck: TDataValidatorCheckAll = TDataValidatorCheckAll.tcAll): IDataValidatorResult;
var
LOK: Boolean;
LInfo: IDataValidatorInformations;
@@ -241,29 +264,30 @@ function TDataValidatorJSON.CheckValueArray(const ACheckAll: Boolean): IDataVali
for Enum in FList do
begin
LListValidatorItem := (Enum.Value as IDataValidatorContextBase).GetItem;
- LName := Enum.Key;
+
+ LName := (Enum.Value as IDataValidatorJSONValues).GetName;
for I := 0 to Pred((FJSON as TJSONArray).Count) do
begin
if not((FJSON as TJSONArray).Items[I] is TJSONObject) then
Continue;
- LValueSanitizer := TValue.From(((FJSON as TJSONArray).Items[I] as TJSONObject).Get(LName));
+ LValueSanitizer := TValue.From(((FJSON as TJSONArray).Items[I] as TJSONObject).Get(Enum.Key));
for J := 0 to Pred(LListValidatorItem.Count) do
begin
LValidatorItem := LListValidatorItem.Items[J];
+ LValidatorItem.SetKey(Enum.Key);
+ LValidatorItem.SetName(LName);
+ LValidatorItem.SetValue(LValueSanitizer);
+
if (LValidatorItem is TDataValidatorItemBaseSanitizer) then
begin
- LValidatorItem.SetValue(LValueSanitizer);
LValueSanitizer := (LValidatorItem as TDataValidatorItemBaseSanitizer).Sanitize;
Continue;
end;
- LValidatorItem.SetName(LName);
- LValidatorItem.SetValue(LValueSanitizer);
-
LValidatorResult := LValidatorItem.Check;
if not LValidatorResult.OK then
@@ -278,7 +302,10 @@ function TDataValidatorJSON.CheckValueArray(const ACheckAll: Boolean): IDataVali
Break;
if not ACheckAll then
- Break;
+ Break
+ else
+ if ATypeCheck = TDataValidatorCheckAll.tcFirst then
+ Break;
end
else
if (LValidatorItem is TDataValidatorJSONKeyIsOptional) or (LValidatorItem is TValidatorIsOptional) then
@@ -296,40 +323,45 @@ function TDataValidatorJSON.CheckValueArray(const ACheckAll: Boolean): IDataVali
Result := TDataValidatorResult.Create(LOK, LInfo, LValues);
end;
-function TDataValidatorJSON.CheckItemValueObject(const AName: string; const ACheckAll: Boolean): IDataValidatorResult;
+function TDataValidatorJSON.CheckItemValueObject(const AKey: string; const ACheckAll: Boolean): IDataValidatorResult;
var
LValue: IDataValidatorJSONBaseContext;
LOK: Boolean;
LInfo: IDataValidatorInformations;
LListValidatorItem: TList;
+ LName: string;
LValueSanitizer: TValue;
I: Integer;
LValidatorItem: IDataValidatorItem;
LValidatorResult: IDataValidatorResult;
LValues: TArray;
begin
- if not TryGetValue(AName, LValue) then
+ if not TryGetValue(AKey, LValue) then
Exit(nil);
LOK := True;
LInfo := TDataValidatorInformations.Create;
LListValidatorItem := (LValue as IDataValidatorContextBase).GetItem;
- LValueSanitizer := TValue.From((FJSON as TJSONObject).Get(AName));
+
+ LName := (LValue as IDataValidatorJSONValues).GetName;
+
+ LValueSanitizer := TValue.From((FJSON as TJSONObject).Get(AKey));
for I := 0 to Pred(LListValidatorItem.Count) do
begin
LValidatorItem := LListValidatorItem.Items[I];
+ LValidatorItem.SetKey(AKey);
+ LValidatorItem.SetName(LName);
+ LValidatorItem.SetValue(LValueSanitizer);
+
if (LValidatorItem is TDataValidatorItemBaseSanitizer) then
begin
- LValidatorItem.SetValue(LValueSanitizer);
LValueSanitizer := (LValidatorItem as TDataValidatorItemBaseSanitizer).Sanitize;
Continue;
end;
- LValidatorItem.SetValue(LValueSanitizer);
-
LValidatorResult := LValidatorItem.Check;
if not LValidatorResult.OK then
@@ -356,12 +388,13 @@ function TDataValidatorJSON.CheckItemValueObject(const AName: string; const AChe
Result := TDataValidatorResult.Create(LOK, LInfo, LValues);
end;
-function TDataValidatorJSON.CheckItemValueArray(const AName: string; const ACheckAll: Boolean): IDataValidatorResult;
+function TDataValidatorJSON.CheckItemValueArray(const AKey: string; const ACheckAll: Boolean): IDataValidatorResult;
var
LValue: IDataValidatorJSONBaseContext;
LOK: Boolean;
LInfo: IDataValidatorInformations;
LListValidatorItem: TList;
+ LName: string;
LValueSanitizer: TValue;
I: Integer;
J: Integer;
@@ -369,7 +402,7 @@ function TDataValidatorJSON.CheckItemValueArray(const AName: string; const AChec
LValidatorResult: IDataValidatorResult;
LValues: TArray;
begin
- if not TryGetValue(AName, LValue) then
+ if not TryGetValue(AKey, LValue) then
Exit(nil);
LOK := True;
@@ -377,26 +410,29 @@ function TDataValidatorJSON.CheckItemValueArray(const AName: string; const AChec
LListValidatorItem := (LValue as IDataValidatorContextBase).GetItem;
+ LName := (LValue as IDataValidatorJSONValues).GetName;
+
for I := 0 to Pred((FJSON as TJSONArray).Count) do
begin
if not((FJSON as TJSONArray).Items[I] is TJSONObject) then
Continue;
- LValueSanitizer := TValue.From(((FJSON as TJSONArray).Items[I] as TJSONObject).Get(AName));
+ LValueSanitizer := TValue.From(((FJSON as TJSONArray).Items[I] as TJSONObject).Get(AKey));
for J := 0 to Pred(LListValidatorItem.Count) do
begin
LValidatorItem := LListValidatorItem.Items[J];
+ LValidatorItem.SetKey(AKey);
+ LValidatorItem.SetName(LName);
+ LValidatorItem.SetValue(LValueSanitizer);
+
if (LValidatorItem is TDataValidatorItemBaseSanitizer) then
begin
- LValidatorItem.SetValue(LValueSanitizer);
LValueSanitizer := (LValidatorItem as TDataValidatorItemBaseSanitizer).Sanitize;
Continue;
end;
- LValidatorItem.SetValue(LValueSanitizer);
-
LValidatorResult := LValidatorItem.Check;
if not LValidatorResult.OK then
@@ -440,7 +476,7 @@ function TDataValidatorJSON.TValueToString(const AValue: TValue): string;
Result := AValue.AsString;
end;
-function TDataValidatorJSON.TryGetValue(const AName: string; var AValue: IDataValidatorJSONBaseContext): Boolean;
+function TDataValidatorJSON.TryGetValue(const AKey: string; var AValue: IDataValidatorJSONBaseContext): Boolean;
var
LValues: TArray>;
I: Integer;
@@ -451,7 +487,7 @@ function TDataValidatorJSON.TryGetValue(const AName: string; var AValue: IDataVa
LValues := FList.ToArray;
for I := 0 to Pred(Length(LValues)) do
- if LValues[I].Key = AName then
+ if LValues[I].Key = AKey then
begin
Result := True;
AValue := LValues[I].Value;
diff --git a/src/core/DataValidator.Result.Intf.pas b/src/core/DataValidator.Result.Intf.pas
deleted file mode 100644
index f57f9bd..0000000
--- a/src/core/DataValidator.Result.Intf.pas
+++ /dev/null
@@ -1,50 +0,0 @@
-{
- ********************************************************************************
-
- Github - https://github.com/dliocode/datavalidator
-
- ********************************************************************************
-
- MIT License
-
- Copyright (c) 2021 Danilo Lucas
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-
- ********************************************************************************
-}
-
-unit DataValidator.Result.Intf;
-
-interface
-
-uses
- DataValidator.Information.Intf;
-
-type
- IDataValidatorResult = interface
- ['{1527205B-B5F7-4058-B056-53C4F89EC8C9}']
- function OK: Boolean;
- function Informations: IDataValidatorInformationsResult;
- function Values: TArray;
- end;
-
-implementation
-
-end.
diff --git a/src/core/DataValidator.Result.pas b/src/core/DataValidator.Result.pas
index a43d4b4..14c27c8 100644
--- a/src/core/DataValidator.Result.pas
+++ b/src/core/DataValidator.Result.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -35,7 +35,7 @@
interface
uses
- DataValidator.Result.Intf, DataValidator.Information.Intf,
+ DataValidator.Intf,
System.SysUtils;
type
diff --git a/src/core/DataValidator.Schema.Base.pas b/src/core/DataValidator.Schema.Base.pas
index 4be1c26..2233240 100644
--- a/src/core/DataValidator.Schema.Base.pas
+++ b/src/core/DataValidator.Schema.Base.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -35,7 +35,8 @@
interface
uses
- DataValidator.Intf, DataValidator.Context, DataValidator.Context.Intf;
+ DataValidator.Intf,
+ DataValidator.Context;
type
TDataValidatorSchemaBase = class(TDataValidatorContext, IDataValidatorSchemaBase, IDataValidatorSchemaContext)
diff --git a/src/core/DataValidator.Schema.pas b/src/core/DataValidator.Schema.pas
index f8f5785..b24f7ef 100644
--- a/src/core/DataValidator.Schema.pas
+++ b/src/core/DataValidator.Schema.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/core/DataValidator.Types.pas b/src/core/DataValidator.Types.pas
index dd5c26f..1d5bdc5 100644
--- a/src/core/DataValidator.Types.pas
+++ b/src/core/DataValidator.Types.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -39,13 +39,17 @@ interface
type
TDataValidatorMessage = record
- Title: string;
- Message: string;
- Description: string;
- Status: string;
- Uri: string;
-
- constructor Create(const ATitle: string; const AMessage: string; const ADescription: string; const AStatus: string; const AUri: string); overload;
+ Title: string; // Error creating product
+ Message: string; // Could not create product
+ Description: string; // Exception Message
+ Solution: string; // The solution is to fill in all the data
+ Source: string; // VIEW PRODUCT
+ Code: string; // P001
+ CodeName: string; // ERROR_PRODUCT_CREATOR
+ Uri: string; // http://help.developer.org/error_product_creator
+ Data: string; // Anything
+
+ constructor Create(const ATitle: string; const AMessage: string; const ADescription: string; const ASolution: string; const ASource: string = ''; const ACode: string = ''; const ACodeName: string = ''; const AUri: string = ''; const AData: string = ''); overload;
constructor Create(const AMessage: string; const ADescription: string = ''); overload;
constructor Create(const AJSONObject: TJSONObject; const AOwner: Boolean = False); overload;
@@ -53,7 +57,10 @@ TDataValidatorMessage = record
function ToJSONString(const AIncludeAll: Boolean = True): string; overload;
end;
+{$SCOPEDENUMS ON}
TDataValidatorLocaleLanguage = (tl_en_US, tl_de_DE, tl_fr_FR, tl_it_IT, tl_es_ES, tl_ru_RU, tl_pt_BR);
+ TDataValidatorCheckAll = (tcAll, tcFirst);
+{$SCOPEDENUMS OFF}
TDataValidatorCustomResult = reference to function: Boolean;
TDataValidatorCustomSanitizer = reference to function(const AValue: string): string;
@@ -76,13 +83,19 @@ implementation
{ TDataValidatorMessage }
-constructor TDataValidatorMessage.Create(const ATitle: string; const AMessage: string; const ADescription: string; const AStatus: string; const AUri: string);
+constructor TDataValidatorMessage.Create(const ATitle: string; const AMessage: string; const ADescription: string; const ASolution: string; const ASource: string = ''; const ACode: string = ''; const ACodeName: string = ''; const AUri: string = ''; const AData: string = '');
begin
Self.Title := ATitle;
- Self.Title := AMessage;
- Self.Title := ADescription;
- Self.Title := AStatus;
- Self.Title := AUri;
+ Self.Message := AMessage;
+ Self.Description := ADescription;
+ Self.Solution := ASolution;
+
+ Self.Source := ASource;
+ Self.Code := ACode;
+ Self.CodeName := ACodeName;
+ Self.Uri := AUri;
+
+ Self.Data := AData;
end;
constructor TDataValidatorMessage.Create(const AMessage: string; const ADescription: string = '');
@@ -92,29 +105,20 @@ constructor TDataValidatorMessage.Create(const AMessage: string; const ADescript
end;
constructor TDataValidatorMessage.Create(const AJSONObject: TJSONObject; const AOwner: Boolean = False);
-var
- LValue: TJSONValue;
begin
- try
- LValue := AJSONObject.GetValue('title');
- if Assigned(LValue) then
- Self.Title := LValue.Value;
-
- LValue := AJSONObject.GetValue('message');
- if Assigned(LValue) then
- Self.Message := LValue.Value;
+ if not Assigned(AJSONObject) then
+ Exit;
- LValue := AJSONObject.GetValue('description');
- if Assigned(LValue) then
- Self.Description := LValue.Value;
-
- LValue := AJSONObject.GetValue('status');
- if Assigned(LValue) then
- Self.Status := LValue.Value;
-
- LValue := AJSONObject.GetValue('uri');
- if Assigned(LValue) then
- Self.Uri := LValue.Value;
+ try
+ Self.Title := AJSONObject.GetValue('title', Self.Title);
+ Self.Message := AJSONObject.GetValue('message', Self.Message);
+ Self.Description := AJSONObject.GetValue('description', Self.Description);
+ Self.Solution := AJSONObject.GetValue('solution', Self.Solution);
+ Self.Source := AJSONObject.GetValue('source', Self.Source);
+ Self.Code := AJSONObject.GetValue('code', Self.Code);
+ Self.CodeName := AJSONObject.GetValue('code_name', Self.CodeName);
+ Self.Uri := AJSONObject.GetValue('uri', Self.Uri);
+ Self.Data := AJSONObject.GetValue('data', Self.Data);
finally
if AOwner then
AJSONObject.Free;
@@ -136,12 +140,24 @@ function TDataValidatorMessage.ToJSONObject(const AIncludeAll: Boolean = True):
if not Self.Description.IsEmpty or AIncludeAll then
LJO.AddPair('description', Self.Description);
- if not Self.Status.IsEmpty or AIncludeAll then
- LJO.AddPair('status', Self.Status);
+ if not Self.Solution.IsEmpty or AIncludeAll then
+ LJO.AddPair('solution', Self.Solution);
+
+ if not Self.Source.IsEmpty or AIncludeAll then
+ LJO.AddPair('source', Self.Source);
+
+ if not Self.Code.IsEmpty or AIncludeAll then
+ LJO.AddPair('code', Self.Code);
+
+ if not Self.CodeName.IsEmpty or AIncludeAll then
+ LJO.AddPair('code_name', Self.CodeName);
if not Self.Uri.IsEmpty or AIncludeAll then
LJO.AddPair('uri', Self.Uri);
+ if not Self.Data.IsEmpty or AIncludeAll then
+ LJO.AddPair('data', Self.Data);
+
Result := LJO;
end;
diff --git a/src/core/DataValidator.Value.Base.pas b/src/core/DataValidator.Value.Base.pas
index 65223d4..df0254c 100644
--- a/src/core/DataValidator.Value.Base.pas
+++ b/src/core/DataValidator.Value.Base.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -35,7 +35,8 @@
interface
uses
- DataValidator.Intf, DataValidator.Context;
+ DataValidator.Intf,
+ DataValidator.Context;
type
TDataValidatorValueBase = class(TDataValidatorContext, IDataValidatorValueBase, IDataValidatorValueValues)
@@ -43,22 +44,26 @@ TDataValidatorValueBase = class(TDataValidatorContext
[weak]
FResult: IDataValidatorValueResult;
FValue: TArray;
+ FName: string;
public
function &End: IDataValidatorValueResult;
function GetValues: TArray;
+ function GetName: string;
- constructor Create(const AResult: IDataValidatorValueResult; const AValue: TArray); reintroduce;
+ constructor Create(const AResult: IDataValidatorValueResult; const AValue: TArray; const AName: string = ''); reintroduce;
end;
implementation
{ TDataValidatorValueBase }
-constructor TDataValidatorValueBase.Create(const AResult: IDataValidatorValueResult; const AValue: TArray);
+constructor TDataValidatorValueBase.Create(const AResult: IDataValidatorValueResult; const AValue: TArray; const AName: string = '');
begin
inherited Create(Self, '');
+
FResult := AResult;
FValue := AValue;
+ FName := AName;
end;
function TDataValidatorValueBase.&End: IDataValidatorValueResult;
@@ -71,4 +76,9 @@ function TDataValidatorValueBase.GetValues: TArray;
Result := FValue;
end;
+function TDataValidatorValueBase.GetName: string;
+begin
+ Result := FName;
+end;
+
end.
diff --git a/src/core/DataValidator.Value.pas b/src/core/DataValidator.Value.pas
index 51b5a1d..30fd311 100644
--- a/src/core/DataValidator.Value.pas
+++ b/src/core/DataValidator.Value.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -35,7 +35,8 @@
interface
uses
- DataValidator.Intf, DataValidator.Result.Intf, DataValidator.Information.Intf, DataValidator.ItemBase.Intf, DataValidator.Context.Intf,
+ DataValidator.Types,
+ DataValidator.Intf,
System.Generics.Collections, System.Rtti, System.JSON;
type
@@ -43,14 +44,14 @@ TDataValidatorValue = class(TInterfacedObject, IDataValidatorValue, IDataValid
private
FList: TList;
- function CheckValue(const ACheckAll: Boolean): IDataValidatorResult;
+ function CheckValue(const ACheckAll: Boolean; const ATypeCheck: TDataValidatorCheckAll = TDataValidatorCheckAll.tcAll): IDataValidatorResult;
function TValueToString(const AValue: TValue): string;
public
- function Validate(const AValue: string): IDataValidatorValueBaseContext; overload;
- function Validate(const AValue: TArray): IDataValidatorValueBaseContext; overload;
+ function Validate(const AValue: string; const AName: string = ''): IDataValidatorValueBaseContext; overload;
+ function Validate(const AValue: TArray; const AName: string = ''): IDataValidatorValueBaseContext; overload;
function Check: IDataValidatorResult;
- function CheckAll: IDataValidatorResult;
+ function CheckAll(const ATypeCheck: TDataValidatorCheckAll = TDataValidatorCheckAll.tcAll): IDataValidatorResult;
constructor Create;
destructor Destroy; override;
@@ -74,14 +75,14 @@ destructor TDataValidatorValue.Destroy;
FList.Free;
end;
-function TDataValidatorValue.Validate(const AValue: string): IDataValidatorValueBaseContext;
+function TDataValidatorValue.Validate(const AValue: string; const AName: string = ''): IDataValidatorValueBaseContext;
begin
- Result := Validate([AValue]);
+ Result := Validate([AValue], AName);
end;
-function TDataValidatorValue.Validate(const AValue: TArray): IDataValidatorValueBaseContext;
+function TDataValidatorValue.Validate(const AValue: TArray; const AName: string = ''): IDataValidatorValueBaseContext;
begin
- FList.Add(TDataValidatorValueBase.Create(Self, AValue));
+ FList.Add(TDataValidatorValueBase.Create(Self, AValue, AName));
Result := FList.Last;
end;
@@ -90,18 +91,19 @@ function TDataValidatorValue.Check: IDataValidatorResult;
Result := CheckValue(False);
end;
-function TDataValidatorValue.CheckAll: IDataValidatorResult;
+function TDataValidatorValue.CheckAll(const ATypeCheck: TDataValidatorCheckAll = TDataValidatorCheckAll.tcAll): IDataValidatorResult;
begin
- Result := CheckValue(True);
+ Result := CheckValue(True, ATypeCheck);
end;
-function TDataValidatorValue.CheckValue(const ACheckAll: Boolean): IDataValidatorResult;
+function TDataValidatorValue.CheckValue(const ACheckAll: Boolean; const ATypeCheck: TDataValidatorCheckAll = TDataValidatorCheckAll.tcAll): IDataValidatorResult;
var
LOK: Boolean;
LInfo: IDataValidatorInformations;
I: Integer;
LListValidatorItem: TList;
LValue: TArray;
+ LName: string;
J: Integer;
LValueSanitizer: TValue;
K: Integer;
@@ -116,6 +118,7 @@ function TDataValidatorValue.CheckValue(const ACheckAll: Boolean): IDataValidato
begin
LListValidatorItem := (FList.Items[I] as IDataValidatorContextBase).GetItem;
LValue := (FList.Items[I] as IDataValidatorValueValues).GetValues;
+ LName := (FList.Items[I] as IDataValidatorValueValues).GetName;
for J := 0 to Pred(Length(LValue)) do
begin
@@ -125,16 +128,16 @@ function TDataValidatorValue.CheckValue(const ACheckAll: Boolean): IDataValidato
begin
LValidatorItem := LListValidatorItem.Items[K];
+ LValidatorItem.SetKey(LName);
+ LValidatorItem.SetName(LName);
+ LValidatorItem.SetValue(LValueSanitizer);
+
if (LValidatorItem is TDataValidatorItemBaseSanitizer) then
begin
- LValidatorItem.SetValue(LValueSanitizer);
LValueSanitizer := (LValidatorItem as TDataValidatorItemBaseSanitizer).Sanitize;
Continue;
end;
- LValidatorItem.SetName('');
- LValidatorItem.SetValue(LValueSanitizer);
-
LValidatorResult := LValidatorItem.Check;
if not LValidatorResult.OK then
@@ -146,7 +149,10 @@ function TDataValidatorValue.CheckValue(const ACheckAll: Boolean): IDataValidato
LInfo.Add(LValidatorResult.Informations as IDataValidatorInformations);
if not ACheckAll then
- Break;
+ Break
+ else
+ if ATypeCheck = TDataValidatorCheckAll.tcFirst then
+ Break;
end
else
if LValidatorItem is TValidatorIsOptional then
diff --git a/src/core/DataValidator.pas b/src/core/DataValidator.pas
index 6c079f5..8e746f1 100644
--- a/src/core/DataValidator.pas
+++ b/src/core/DataValidator.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -35,13 +35,15 @@
interface
uses
- DataValidator.Intf, DataValidator.Context.Intf, DataValidator.Result.Intf,
- DataValidator.Types, DataValidator.Schema, DataValidator.Value, DataValidator.JSON,
+ DataValidator.Types,
+ DataValidator.Intf,
System.JSON;
type
TDataValidatorLocaleLanguage = DataValidator.Types.TDataValidatorLocaleLanguage;
TDataValidatorMessage = DataValidator.Types.TDataValidatorMessage;
+ TDataValidatorCheckAll = DataValidator.Types.TDataValidatorCheckAll;
+ TDataValidatorWithMessage = DataValidator.Types.TDataValidatorWithMessage;
IDataValidatorSchema = DataValidator.Intf.IDataValidatorSchema;
IDataValidatorValue = DataValidator.Intf.IDataValidatorValue;
@@ -50,29 +52,36 @@ interface
IDataValidatorValueResult = DataValidator.Intf.IDataValidatorValueResult;
IDataValidatorJSONResult = DataValidator.Intf.IDataValidatorJSONResult;
- IDataValidatorResult = DataValidator.Result.Intf.IDataValidatorResult;
- IDataValidatorSchemaContext = DataValidator.Context.Intf.IDataValidatorSchemaContext;
+ IDataValidatorResult = DataValidator.Intf.IDataValidatorResult;
+ IDataValidatorSchemaContext = DataValidator.Intf.IDataValidatorSchemaContext;
- TDataValidator = class
+ TJSONObject = System.JSON.TJSONObject;
+ TJSONArray = System.JSON.TJSONArray;
+ TJSONValue = System.JSON.TJSONValue;
+
+ TDataValidator = record
public
- class function Schema: IDataValidatorSchema;
- class function Values: IDataValidatorValue;
- class function JSON(const AJSON: TJSONObject): IDataValidatorJSON; overload;
- class function JSON(const AJSON: TJSONArray): IDataValidatorJSON; overload;
+ class function Schema: IDataValidatorSchema; static;
+ class function Values: IDataValidatorValue; static;
+ class function JSON(const AJSON: TJSONObject): IDataValidatorJSON; overload; static;
+ class function JSON(const AJSON: TJSONArray): IDataValidatorJSON; overload; static;
end;
implementation
+uses
+ DataValidator.Schema, DataValidator.Value, DataValidator.JSON;
+
{ TDataValidator }
class function TDataValidator.Schema: IDataValidatorSchema;
begin
- Result := TDataValidatorSchema.Create();
+ Result := TDataValidatorSchema.Create;
end;
class function TDataValidator.Values: IDataValidatorValue;
begin
- Result := TDataValidatorValue.Create();
+ Result := TDataValidatorValue.Create;
end;
class function TDataValidator.JSON(const AJSON: TJSONObject): IDataValidatorJSON;
diff --git a/src/sanitializators/Sanitizer.Base64.Decode.pas b/src/sanitializators/Sanitizer.Base64.Decode.pas
index c5522ca..04b2812 100644
--- a/src/sanitializators/Sanitizer.Base64.Decode.pas
+++ b/src/sanitializators/Sanitizer.Base64.Decode.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/sanitializators/Sanitizer.Base64.Encode.pas b/src/sanitializators/Sanitizer.Base64.Encode.pas
index 44554e8..c730a02 100644
--- a/src/sanitializators/Sanitizer.Base64.Encode.pas
+++ b/src/sanitializators/Sanitizer.Base64.Encode.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/sanitializators/Sanitizer.Custom.pas b/src/sanitializators/Sanitizer.Custom.pas
index 2cba28d..33afea3 100644
--- a/src/sanitializators/Sanitizer.Custom.pas
+++ b/src/sanitializators/Sanitizer.Custom.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/sanitializators/Sanitizer.HTML.Decode.pas b/src/sanitializators/Sanitizer.HTML.Decode.pas
index 33f686f..694091f 100644
--- a/src/sanitializators/Sanitizer.HTML.Decode.pas
+++ b/src/sanitializators/Sanitizer.HTML.Decode.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/sanitializators/Sanitizer.HTML.Encode.pas b/src/sanitializators/Sanitizer.HTML.Encode.pas
index a37f72d..995422d 100644
--- a/src/sanitializators/Sanitizer.HTML.Encode.pas
+++ b/src/sanitializators/Sanitizer.HTML.Encode.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/sanitializators/Sanitizer.NormalizeEmail.pas b/src/sanitializators/Sanitizer.NormalizeEmail.pas
index 7ff3315..7506c06 100644
--- a/src/sanitializators/Sanitizer.NormalizeEmail.pas
+++ b/src/sanitializators/Sanitizer.NormalizeEmail.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/sanitializators/Sanitizer.OnlyNumbers.pas b/src/sanitializators/Sanitizer.OnlyNumbers.pas
index 43ad01a..5849168 100644
--- a/src/sanitializators/Sanitizer.OnlyNumbers.pas
+++ b/src/sanitializators/Sanitizer.OnlyNumbers.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/sanitializators/Sanitizer.RemoveAccents.pas b/src/sanitializators/Sanitizer.RemoveAccents.pas
index 18bcbf4..78c3e07 100644
--- a/src/sanitializators/Sanitizer.RemoveAccents.pas
+++ b/src/sanitializators/Sanitizer.RemoveAccents.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/sanitializators/Sanitizer.Replace.pas b/src/sanitializators/Sanitizer.Replace.pas
index 2f042f0..1fed5fd 100644
--- a/src/sanitializators/Sanitizer.Replace.pas
+++ b/src/sanitializators/Sanitizer.Replace.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/sanitializators/Sanitizer.ToDate.pas b/src/sanitializators/Sanitizer.ToDate.pas
index 7c6def5..4423e87 100644
--- a/src/sanitializators/Sanitizer.ToDate.pas
+++ b/src/sanitializators/Sanitizer.ToDate.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/sanitializators/Sanitizer.ToDateTime.pas b/src/sanitializators/Sanitizer.ToDateTime.pas
index 12e7687..372049c 100644
--- a/src/sanitializators/Sanitizer.ToDateTime.pas
+++ b/src/sanitializators/Sanitizer.ToDateTime.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/sanitializators/Sanitizer.ToInteger.pas b/src/sanitializators/Sanitizer.ToInteger.pas
index 907510c..019ff89 100644
--- a/src/sanitializators/Sanitizer.ToInteger.pas
+++ b/src/sanitializators/Sanitizer.ToInteger.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/sanitializators/Sanitizer.ToLowerCase.pas b/src/sanitializators/Sanitizer.ToLowerCase.pas
index 59a2229..090cbd8 100644
--- a/src/sanitializators/Sanitizer.ToLowerCase.pas
+++ b/src/sanitializators/Sanitizer.ToLowerCase.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/sanitializators/Sanitizer.ToMD5.pas b/src/sanitializators/Sanitizer.ToMD5.pas
index f15d614..255cd0f 100644
--- a/src/sanitializators/Sanitizer.ToMD5.pas
+++ b/src/sanitializators/Sanitizer.ToMD5.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/sanitializators/Sanitizer.ToNumeric.pas b/src/sanitializators/Sanitizer.ToNumeric.pas
index 9bd859b..1d3c7cc 100644
--- a/src/sanitializators/Sanitizer.ToNumeric.pas
+++ b/src/sanitializators/Sanitizer.ToNumeric.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/sanitializators/Sanitizer.ToTime.pas b/src/sanitializators/Sanitizer.ToTime.pas
index cbc8096..20d2107 100644
--- a/src/sanitializators/Sanitizer.ToTime.pas
+++ b/src/sanitializators/Sanitizer.ToTime.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/sanitializators/Sanitizer.ToUpperCase.pas b/src/sanitializators/Sanitizer.ToUpperCase.pas
index 8a55666..1b6ef78 100644
--- a/src/sanitializators/Sanitizer.ToUpperCase.pas
+++ b/src/sanitializators/Sanitizer.ToUpperCase.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/sanitializators/Sanitizer.Trim.pas b/src/sanitializators/Sanitizer.Trim.pas
index 236cbe4..91c8009 100644
--- a/src/sanitializators/Sanitizer.Trim.pas
+++ b/src/sanitializators/Sanitizer.Trim.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/sanitializators/Sanitizer.TrimLeft.pas b/src/sanitializators/Sanitizer.TrimLeft.pas
index b45a75d..b956ce2 100644
--- a/src/sanitializators/Sanitizer.TrimLeft.pas
+++ b/src/sanitializators/Sanitizer.TrimLeft.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/sanitializators/Sanitizer.TrimRight.pas b/src/sanitializators/Sanitizer.TrimRight.pas
index 713c353..acba8c3 100644
--- a/src/sanitializators/Sanitizer.TrimRight.pas
+++ b/src/sanitializators/Sanitizer.TrimRight.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/sanitializators/Sanitizer.URL.Decode.pas b/src/sanitializators/Sanitizer.URL.Decode.pas
index 658ed59..ebf94f2 100644
--- a/src/sanitializators/Sanitizer.URL.Decode.pas
+++ b/src/sanitializators/Sanitizer.URL.Decode.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/sanitializators/Sanitizer.URL.Encode.pas b/src/sanitializators/Sanitizer.URL.Encode.pas
index 735880d..821c939 100644
--- a/src/sanitializators/Sanitizer.URL.Encode.pas
+++ b/src/sanitializators/Sanitizer.URL.Encode.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.Contains.pas b/src/validators/Validator.Contains.pas
index 470b0ab..b88a29e 100644
--- a/src/validators/Validator.Contains.pas
+++ b/src/validators/Validator.Contains.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.Custom.pas b/src/validators/Validator.Custom.pas
index 4d3fb47..1f2c408 100644
--- a/src/validators/Validator.Custom.pas
+++ b/src/validators/Validator.Custom.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.EndsWith.pas b/src/validators/Validator.EndsWith.pas
index 8cd024b..b11b4d4 100644
--- a/src/validators/Validator.EndsWith.pas
+++ b/src/validators/Validator.EndsWith.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsAlpha.pas b/src/validators/Validator.IsAlpha.pas
index 0c384f2..05e4ab8 100644
--- a/src/validators/Validator.IsAlpha.pas
+++ b/src/validators/Validator.IsAlpha.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -36,25 +36,28 @@ interface
uses
DataValidator.ItemBase,
- System.SysUtils, System.RegularExpressions;
+ System.SysUtils, System.StrUtils, System.RegularExpressions;
type
TValidatorIsAlpha = class(TDataValidatorItemBase, IDataValidatorItem)
private
+ FAllowedCharacters: TArray;
+ function GetCharactersAllow: string;
function GetPattern: string;
public
function Check: IDataValidatorResult;
- constructor Create(const AMessage: string; const AExecute: TDataValidatorInformationExecute = nil);
+ constructor Create(const AAllowedCharacters: TArray; const AMessage: string; const AExecute: TDataValidatorInformationExecute = nil);
end;
implementation
{ TValidatorIsAlpha }
-constructor TValidatorIsAlpha.Create(const AMessage: string; const AExecute: TDataValidatorInformationExecute = nil);
+constructor TValidatorIsAlpha.Create(const AAllowedCharacters: TArray; const AMessage: string; const AExecute: TDataValidatorInformationExecute = nil);
begin
inherited Create;
+ FAllowedCharacters := AAllowedCharacters;
SetMessage(AMessage);
SetExecute(AExecute);
end;
@@ -76,24 +79,41 @@ function TValidatorIsAlpha.Check: IDataValidatorResult;
Result := TDataValidatorResult.Create(R, TDataValidatorInformation.Create(LValue, GetMessage, FExecute));
end;
+function TValidatorIsAlpha.GetCharactersAllow: string;
+var
+ I: Integer;
+begin
+ Result := '';
+
+ for I := Low(FAllowedCharacters) to High(FAllowedCharacters) do
+ begin
+ if MatchText(FAllowedCharacters[I], ['\', ']', '-']) then
+ Result := Result + '\';
+
+ Result := Result + FAllowedCharacters[I];
+ end;
+end;
+
function TValidatorIsAlpha.GetPattern: string;
begin
case FLocaleLanguage of
TDataValidatorLocaleLanguage.tl_en_US:
- Result := '^[A-Za-z\s]+$';
+ Result := '^[A-Za-z\s%s]+$';
TDataValidatorLocaleLanguage.tl_de_DE:
- Result := '^[A-ZÄÖÜßa-zäöüß\s]+$';
+ Result := '^[A-ZÄÖÜßa-zäöüß\s%s]+$';
TDataValidatorLocaleLanguage.tl_fr_FR:
- Result := '^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸa-zàâæçéèêëïîôœùûüÿ\s]+$';
+ Result := '^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸa-zàâæçéèêëïîôœùûüÿ\s%s]+$';
TDataValidatorLocaleLanguage.tl_it_IT:
- Result := '^[A-ZÀÉÈÌÎÓÒÙa-zàéèìîóòù\s]+$';
+ Result := '^[A-ZÀÉÈÌÎÓÒÙa-zàéèìîóòù\s%s]+$';
TDataValidatorLocaleLanguage.tl_es_ES:
- Result := '^[A-ZÁÉÍÑÓÚÜa-záéíñóúü\s]+$';
+ Result := '^[A-ZÁÉÍÑÓÚÜa-záéíñóúü\s%s]+$';
TDataValidatorLocaleLanguage.tl_ru_RU:
- Result := '^[А-ЯЁа-яё\s]+$';
+ Result := '^[А-ЯЁа-яё\s%s]+$';
TDataValidatorLocaleLanguage.tl_pt_BR:
- Result := '^[A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜa-zãáàâäçéêëíïõóôöúü\s]+$';
+ Result := '^[A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜa-zãáàâäçéêëíïõóôöúü\s%s]+$';
end;
+
+ Result := Format(Result, [GetCharactersAllow]);
end;
end.
diff --git a/src/validators/Validator.IsAlphanumeric.pas b/src/validators/Validator.IsAlphanumeric.pas
index edef956..9004a0a 100644
--- a/src/validators/Validator.IsAlphanumeric.pas
+++ b/src/validators/Validator.IsAlphanumeric.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -36,25 +36,28 @@ interface
uses
DataValidator.ItemBase,
- System.SysUtils, System.RegularExpressions;
+ System.SysUtils, System.StrUtils, System.RegularExpressions;
type
TValidatorIsAlphanumeric = class(TDataValidatorItemBase, IDataValidatorItem)
private
+ FAllowedCharacters: TArray;
+ function GetCharactersAllow: string;
function GetPattern: string;
public
function Check: IDataValidatorResult;
- constructor Create(const AMessage: string; const AExecute: TDataValidatorInformationExecute = nil);
+ constructor Create(const AAllowedCharacters: TArray; const AMessage: string; const AExecute: TDataValidatorInformationExecute = nil);
end;
implementation
{ TValidatorIsAlphanumeric }
-constructor TValidatorIsAlphanumeric.Create(const AMessage: string; const AExecute: TDataValidatorInformationExecute = nil);
+constructor TValidatorIsAlphanumeric.Create(const AAllowedCharacters: TArray; const AMessage: string; const AExecute: TDataValidatorInformationExecute = nil);
begin
inherited Create;
+ FAllowedCharacters := AAllowedCharacters;
SetMessage(AMessage);
SetExecute(AExecute);
end;
@@ -76,24 +79,41 @@ function TValidatorIsAlphanumeric.Check: IDataValidatorResult;
Result := TDataValidatorResult.Create(R, TDataValidatorInformation.Create(LValue, GetMessage, FExecute));
end;
+function TValidatorIsAlphanumeric.GetCharactersAllow: string;
+var
+ I: Integer;
+begin
+ Result := '';
+
+ for I := Low(FAllowedCharacters) to High(FAllowedCharacters) do
+ begin
+ if MatchText(FAllowedCharacters[I], ['\', ']', '-']) then
+ Result := Result + '\';
+
+ Result := Result + FAllowedCharacters[I];
+ end;
+end;
+
function TValidatorIsAlphanumeric.GetPattern: string;
begin
case FLocaleLanguage of
TDataValidatorLocaleLanguage.tl_en_US:
- Result := '^[0-9A-Za-z\s]+$';
+ Result := '^[0-9A-Za-z\s%s]+$';
TDataValidatorLocaleLanguage.tl_de_DE:
- Result := '^[0-9A-ZÄÖÜßa-zäöüß\s]+$';
+ Result := '^[0-9A-ZÄÖÜßa-zäöüß\s%s]+$';
TDataValidatorLocaleLanguage.tl_fr_FR:
- Result := '^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸa-zàâæçéèêëïîôœùûüÿ\s]+$';
+ Result := '^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸa-zàâæçéèêëïîôœùûüÿ\s%s]+$';
TDataValidatorLocaleLanguage.tl_it_IT:
- Result := '^[0-9A-ZÀÉÈÌÎÓÒÙa-zàéèìîóòù\s]+$';
+ Result := '^[0-9A-ZÀÉÈÌÎÓÒÙa-zàéèìîóòù\s%s]+$';
TDataValidatorLocaleLanguage.tl_es_ES:
- Result := '^[0-9A-ZÁÉÍÑÓÚÜa-záéíñóúü\s]+$';
+ Result := '^[0-9A-ZÁÉÍÑÓÚÜa-záéíñóúü\s%s]+$';
TDataValidatorLocaleLanguage.tl_ru_RU:
- Result := '^[0-9А-ЯЁа-яё\s]+$';
+ Result := '^[0-9А-ЯЁа-яё\s%s]+$';
TDataValidatorLocaleLanguage.tl_pt_BR:
- Result := '^[0-9A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜa-zãáàâäçéêëíïõóôöúü\s]+$';
+ Result := '^[0-9A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜa-zãáàâäçéêëíïõóôöúü\s%s]+$';
end;
+
+ Result := Format(Result, [GetCharactersAllow]);
end;
end.
diff --git a/src/validators/Validator.IsAscii.pas b/src/validators/Validator.IsAscii.pas
index 136ec2b..31cbe22 100644
--- a/src/validators/Validator.IsAscii.pas
+++ b/src/validators/Validator.IsAscii.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsBTCAddress.pas b/src/validators/Validator.IsBTCAddress.pas
index cbad82e..ee88c19 100644
--- a/src/validators/Validator.IsBTCAddress.pas
+++ b/src/validators/Validator.IsBTCAddress.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsBase32.pas b/src/validators/Validator.IsBase32.pas
index d9300ed..1ca9746 100644
--- a/src/validators/Validator.IsBase32.pas
+++ b/src/validators/Validator.IsBase32.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsBase58.pas b/src/validators/Validator.IsBase58.pas
index af3bd99..15982c6 100644
--- a/src/validators/Validator.IsBase58.pas
+++ b/src/validators/Validator.IsBase58.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsBase64.pas b/src/validators/Validator.IsBase64.pas
index ffe9708..16501a7 100644
--- a/src/validators/Validator.IsBase64.pas
+++ b/src/validators/Validator.IsBase64.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsBetween.pas b/src/validators/Validator.IsBetween.pas
index 144e6ed..5b4a175 100644
--- a/src/validators/Validator.IsBetween.pas
+++ b/src/validators/Validator.IsBetween.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsBoolean.pas b/src/validators/Validator.IsBoolean.pas
index c86b3de..e3171da 100644
--- a/src/validators/Validator.IsBoolean.pas
+++ b/src/validators/Validator.IsBoolean.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsCNPJ.pas b/src/validators/Validator.IsCNPJ.pas
index a1b8225..9f62eab 100644
--- a/src/validators/Validator.IsCNPJ.pas
+++ b/src/validators/Validator.IsCNPJ.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -120,6 +120,7 @@ function TValidatorIsCNPJ.Validate(const ACNPJ: string): Boolean;
end;
LResultSum := LSum mod 11;
+
if ((LResultSum = 0) or (LResultSum = 1)) then
LDig13 := '0'
else
@@ -138,6 +139,7 @@ function TValidatorIsCNPJ.Validate(const ACNPJ: string): Boolean;
end;
LResultSum := LSum mod 11;
+
if ((LResultSum = 0) or (LResultSum = 1)) then
LDig14 := '0'
else
diff --git a/src/validators/Validator.IsCPF.pas b/src/validators/Validator.IsCPF.pas
index 380fb60..767f21d 100644
--- a/src/validators/Validator.IsCPF.pas
+++ b/src/validators/Validator.IsCPF.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -109,6 +109,7 @@ function TValidatorIsCPF.Validate(const ACPF: string): Boolean;
try
LSum := 0;
LPeso := 10;
+
for I := 1 to 9 do
begin
LSum := LSum + (StrToInt(LCPF[I]) * LPeso);
@@ -116,6 +117,7 @@ function TValidatorIsCPF.Validate(const ACPF: string): Boolean;
end;
LResultSum := 11 - (LSum mod 11);
+
if ((LResultSum = 10) or (LResultSum = 11)) then
LDig10 := '0'
else
@@ -123,6 +125,7 @@ function TValidatorIsCPF.Validate(const ACPF: string): Boolean;
LSum := 0;
LPeso := 11;
+
for I := 1 to 10 do
begin
LSum := LSum + (StrToInt(LCPF[I]) * LPeso);
@@ -130,6 +133,7 @@ function TValidatorIsCPF.Validate(const ACPF: string): Boolean;
end;
LResultSum := 11 - (LSum mod 11);
+
if ((LResultSum = 10) or (LResultSum = 11)) then
LDig11 := '0'
else
diff --git a/src/validators/Validator.IsCPFCNPJ.pas b/src/validators/Validator.IsCPFCNPJ.pas
index 9b99edb..0d97c1a 100644
--- a/src/validators/Validator.IsCPFCNPJ.pas
+++ b/src/validators/Validator.IsCPFCNPJ.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsDate.pas b/src/validators/Validator.IsDate.pas
index db3663b..964cb50 100644
--- a/src/validators/Validator.IsDate.pas
+++ b/src/validators/Validator.IsDate.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsDateBetween.pas b/src/validators/Validator.IsDateBetween.pas
index 295efa8..d101061 100644
--- a/src/validators/Validator.IsDateBetween.pas
+++ b/src/validators/Validator.IsDateBetween.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsDateEquals.pas b/src/validators/Validator.IsDateEquals.pas
index f38637c..da58d96 100644
--- a/src/validators/Validator.IsDateEquals.pas
+++ b/src/validators/Validator.IsDateEquals.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsDateGreaterThan.pas b/src/validators/Validator.IsDateGreaterThan.pas
index f6681bf..803742c 100644
--- a/src/validators/Validator.IsDateGreaterThan.pas
+++ b/src/validators/Validator.IsDateGreaterThan.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsDateLessThan.pas b/src/validators/Validator.IsDateLessThan.pas
index 69d2c5f..4fccb99 100644
--- a/src/validators/Validator.IsDateLessThan.pas
+++ b/src/validators/Validator.IsDateLessThan.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsDateTime.pas b/src/validators/Validator.IsDateTime.pas
index aca00f2..9790401 100644
--- a/src/validators/Validator.IsDateTime.pas
+++ b/src/validators/Validator.IsDateTime.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsEmail.pas b/src/validators/Validator.IsEmail.pas
index 6daef9e..36ca839 100644
--- a/src/validators/Validator.IsEmail.pas
+++ b/src/validators/Validator.IsEmail.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsEmpty.pas b/src/validators/Validator.IsEmpty.pas
index a30043b..a109fa4 100644
--- a/src/validators/Validator.IsEmpty.pas
+++ b/src/validators/Validator.IsEmpty.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsEquals.pas b/src/validators/Validator.IsEquals.pas
index 0e4a7f1..2d6eaf8 100644
--- a/src/validators/Validator.IsEquals.pas
+++ b/src/validators/Validator.IsEquals.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsEthereumAddress.pas b/src/validators/Validator.IsEthereumAddress.pas
index 396cf1f..94e4169 100644
--- a/src/validators/Validator.IsEthereumAddress.pas
+++ b/src/validators/Validator.IsEthereumAddress.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsGTIN.pas b/src/validators/Validator.IsGTIN.pas
index 8ef1a6c..fd36467 100644
--- a/src/validators/Validator.IsGTIN.pas
+++ b/src/validators/Validator.IsGTIN.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsGreaterThan.pas b/src/validators/Validator.IsGreaterThan.pas
index b0f28e5..24c7850 100644
--- a/src/validators/Validator.IsGreaterThan.pas
+++ b/src/validators/Validator.IsGreaterThan.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsHexColor.pas b/src/validators/Validator.IsHexColor.pas
index 63cf0e0..b3b50d5 100644
--- a/src/validators/Validator.IsHexColor.pas
+++ b/src/validators/Validator.IsHexColor.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsHexadecimal.pas b/src/validators/Validator.IsHexadecimal.pas
index 1707bca..91821b3 100644
--- a/src/validators/Validator.IsHexadecimal.pas
+++ b/src/validators/Validator.IsHexadecimal.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsIP.pas b/src/validators/Validator.IsIP.pas
index 1782548..4aec8dd 100644
--- a/src/validators/Validator.IsIP.pas
+++ b/src/validators/Validator.IsIP.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsISO8601.pas b/src/validators/Validator.IsISO8601.pas
index d079833..daa4ea1 100644
--- a/src/validators/Validator.IsISO8601.pas
+++ b/src/validators/Validator.IsISO8601.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsInteger.pas b/src/validators/Validator.IsInteger.pas
index ca15ac8..f0daf89 100644
--- a/src/validators/Validator.IsInteger.pas
+++ b/src/validators/Validator.IsInteger.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsJSON.pas b/src/validators/Validator.IsJSON.pas
index fc1044d..08b19e8 100644
--- a/src/validators/Validator.IsJSON.pas
+++ b/src/validators/Validator.IsJSON.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -84,20 +84,20 @@ function TValidatorIsJson.Check: IDataValidatorResult;
end;
if Assigned(LJV) then
- begin
try
case FTypeJSON of
tjAll:
R := (LJV is TJSONArray) or (LJV is TJSONObject);
+
tjArray:
R := LJV is TJSONArray;
+
tjObject:
R := LJV is TJSONObject;
end;
finally
LJV.Free;
end;
- end;
end;
if FIsNot then
diff --git a/src/validators/Validator.IsJWT.pas b/src/validators/Validator.IsJWT.pas
index 7bad085..14ed0ef 100644
--- a/src/validators/Validator.IsJWT.pas
+++ b/src/validators/Validator.IsJWT.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsLatLong.pas b/src/validators/Validator.IsLatLong.pas
index 0f0dde9..ecc73bb 100644
--- a/src/validators/Validator.IsLatLong.pas
+++ b/src/validators/Validator.IsLatLong.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsLength.pas b/src/validators/Validator.IsLength.pas
index 1636adb..a8c3d78 100644
--- a/src/validators/Validator.IsLength.pas
+++ b/src/validators/Validator.IsLength.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -36,7 +36,7 @@ interface
uses
DataValidator.ItemBase,
- System.SysUtils;
+ System.SysUtils, System.Math;
type
TValidatorIsLength = class(TDataValidatorItemBase, IDataValidatorItem)
@@ -50,9 +50,6 @@ TValidatorIsLength = class(TDataValidatorItemBase, IDataValidatorItem)
implementation
-uses
- Validator.IsBetween;
-
{ TValidatorIsLength }
constructor TValidatorIsLength.Create(const AMin: Integer; const AMax: Integer; const AMessage: string; const AExecute: TDataValidatorInformationExecute = nil);
@@ -70,16 +67,21 @@ function TValidatorIsLength.Check: IDataValidatorResult;
var
LValue: string;
R: Boolean;
- LValidatorBetween: IDataValidatorItem;
+ LLength: Integer;
begin
LValue := GetValueAsString;
R := False;
+ LLength := Length(LValue);
if not Trim(LValue).IsEmpty then
begin
- LValidatorBetween := TValidatorIsBetween.Create(FMin, FMax, '');
- LValidatorBetween.SetValue(IntToStr(Length(LValue)));
- R := LValidatorBetween.Check.OK;
+ R := (LLength >= FMin) and (LLength <= FMax);
+
+ if not R then
+ R := (FMin = 0) and (LLength <= FMax);
+
+ if not R then
+ R := (LLength >= FMin) and (FMax = 0);
end;
if FIsNot then
diff --git a/src/validators/Validator.IsLessThan.pas b/src/validators/Validator.IsLessThan.pas
index d3d104d..6397d01 100644
--- a/src/validators/Validator.IsLessThan.pas
+++ b/src/validators/Validator.IsLessThan.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsLocale.pas b/src/validators/Validator.IsLocale.pas
index 1028e25..d330806 100644
--- a/src/validators/Validator.IsLocale.pas
+++ b/src/validators/Validator.IsLocale.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsLowercase.pas b/src/validators/Validator.IsLowercase.pas
index bfafe17..335abfe 100644
--- a/src/validators/Validator.IsLowercase.pas
+++ b/src/validators/Validator.IsLowercase.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsMACAddress.pas b/src/validators/Validator.IsMACAddress.pas
index 524d2c5..0eed42e 100644
--- a/src/validators/Validator.IsMACAddress.pas
+++ b/src/validators/Validator.IsMACAddress.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsMD5.pas b/src/validators/Validator.IsMD5.pas
index e1a6e4e..7a65a08 100644
--- a/src/validators/Validator.IsMD5.pas
+++ b/src/validators/Validator.IsMD5.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsMagnetURI.pas b/src/validators/Validator.IsMagnetURI.pas
index 52b7681..a4d8539 100644
--- a/src/validators/Validator.IsMagnetURI.pas
+++ b/src/validators/Validator.IsMagnetURI.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsMimeType.pas b/src/validators/Validator.IsMimeType.pas
index fdb4ba1..0358297 100644
--- a/src/validators/Validator.IsMimeType.pas
+++ b/src/validators/Validator.IsMimeType.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsMongoId.pas b/src/validators/Validator.IsMongoId.pas
index 3de4d02..c9c4357 100644
--- a/src/validators/Validator.IsMongoId.pas
+++ b/src/validators/Validator.IsMongoId.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsNegative.pas b/src/validators/Validator.IsNegative.pas
index 6023ce6..5e6685a 100644
--- a/src/validators/Validator.IsNegative.pas
+++ b/src/validators/Validator.IsNegative.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsNumeric.pas b/src/validators/Validator.IsNumeric.pas
index 03272a8..f61b8e2 100644
--- a/src/validators/Validator.IsNumeric.pas
+++ b/src/validators/Validator.IsNumeric.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsOctal.pas b/src/validators/Validator.IsOctal.pas
index 8eb512a..83fa97e 100644
--- a/src/validators/Validator.IsOctal.pas
+++ b/src/validators/Validator.IsOctal.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsOptional.pas b/src/validators/Validator.IsOptional.pas
index 4a25192..521f6e2 100644
--- a/src/validators/Validator.IsOptional.pas
+++ b/src/validators/Validator.IsOptional.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsPassportNumber.pas b/src/validators/Validator.IsPassportNumber.pas
index 3459191..52f8955 100644
--- a/src/validators/Validator.IsPassportNumber.pas
+++ b/src/validators/Validator.IsPassportNumber.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsPhoneNumber.pas b/src/validators/Validator.IsPhoneNumber.pas
index 3b6c294..828a52a 100644
--- a/src/validators/Validator.IsPhoneNumber.pas
+++ b/src/validators/Validator.IsPhoneNumber.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -117,7 +117,7 @@ function TValidatorIsPhoneNumber.GetPattern: string;
Result := Format('^(\+7)?(%s)$', ['\(?(30[1-2]|336|34[1-9]|35[1-3]|365|38[1-5]|388|39[0-1]|39[4-5]|401|41(1|3|5|6)|42(1|3|4|6|7)|47[1-5]|48([1-3]|[5-7])|49([1-6]|[8-9])|81[1-8]|82[0-1]|83(1|2|[4-6])|84[1-8]|85(1|5)|86([1-3]|[5-7]|9)|87([1-3]|[7-9])|80[0-9]|90[0-9]|9[1-9][0-9])\)?\d{7}']);
TDataValidatorLocaleLanguage.tl_pt_BR:
- Result := Format('^(\+55)?(%s|%s)$', ['((030(0|3)|0(5|8|9)00)\d{6,7})', '(\(?(1[1-9]|2([1-2]|4|[7-8])|3([1-5]|[7-8])|4[1-9]|5(1|[3-5])|6[1-9]|7(1|[3-5])|7(7|9)|8[1-9]|9[1-9])\)?9?\d{4}-?\d{4})']);
+ Result := Format('^(\+55)?(%s|%s)$', ['((030(0|3)|0(5|8|9)00)\d{6,7})', '(\(?0?(1[1-9]|2([1-2]|4|[7-8])|3([1-5]|[7-8])|4[1-9]|5(1|[3-5])|6[1-9]|7(1|[3-5])|7(7|9)|8[1-9]|9[1-9])\)?9?\d{4}-?\d{4})']);
end;
end;
diff --git a/src/validators/Validator.IsPort.pas b/src/validators/Validator.IsPort.pas
index d2b5731..6713283 100644
--- a/src/validators/Validator.IsPort.pas
+++ b/src/validators/Validator.IsPort.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsPositive.pas b/src/validators/Validator.IsPositive.pas
index 0ffc3e0..b6e8e90 100644
--- a/src/validators/Validator.IsPositive.pas
+++ b/src/validators/Validator.IsPositive.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsPostalCode.pas b/src/validators/Validator.IsPostalCode.pas
index f545701..c05b9f6 100644
--- a/src/validators/Validator.IsPostalCode.pas
+++ b/src/validators/Validator.IsPostalCode.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsRGBColor.pas b/src/validators/Validator.IsRGBColor.pas
index c327865..5da0c72 100644
--- a/src/validators/Validator.IsRGBColor.pas
+++ b/src/validators/Validator.IsRGBColor.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsSSN.pas b/src/validators/Validator.IsSSN.pas
index 6de23ce..e0ab11c 100644
--- a/src/validators/Validator.IsSSN.pas
+++ b/src/validators/Validator.IsSSN.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsTime.pas b/src/validators/Validator.IsTime.pas
index eef8db9..29fd563 100644
--- a/src/validators/Validator.IsTime.pas
+++ b/src/validators/Validator.IsTime.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsTimeBetween.pas b/src/validators/Validator.IsTimeBetween.pas
index a44a03a..ad43c13 100644
--- a/src/validators/Validator.IsTimeBetween.pas
+++ b/src/validators/Validator.IsTimeBetween.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsTimeEquals.pas b/src/validators/Validator.IsTimeEquals.pas
index 7822e58..bebef03 100644
--- a/src/validators/Validator.IsTimeEquals.pas
+++ b/src/validators/Validator.IsTimeEquals.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsTimeGreaterThan.pas b/src/validators/Validator.IsTimeGreaterThan.pas
index d39c7de..5f729cc 100644
--- a/src/validators/Validator.IsTimeGreaterThan.pas
+++ b/src/validators/Validator.IsTimeGreaterThan.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsTimeLessThan.pas b/src/validators/Validator.IsTimeLessThan.pas
index e4304dc..abe926d 100644
--- a/src/validators/Validator.IsTimeLessThan.pas
+++ b/src/validators/Validator.IsTimeLessThan.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsURL.pas b/src/validators/Validator.IsURL.pas
index 0aaf396..fa15193 100644
--- a/src/validators/Validator.IsURL.pas
+++ b/src/validators/Validator.IsURL.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -67,7 +67,7 @@ function TValidatorIsURL.Check: IDataValidatorResult;
R := False;
if not Trim(LValue).IsEmpty then
- R := TRegEx.IsMatch(LValue, '(([\w]+:)?\/\/)?(([\d\w]|%[a-fA-f\d]{2,2})+(:([\d\w]|%[a-fA-f\d]{2,2})+)?@)?([\d\w][-\d\w]{0,253}[\d\w]\.)+[\w]{2,63}(:[\d]+)?(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?');
+ R := TRegEx.IsMatch(LValue, '^(https?:\/\/)?(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*)$');
if FIsNot then
R := not R;
diff --git a/src/validators/Validator.IsUUID.pas b/src/validators/Validator.IsUUID.pas
index 608d414..53473d8 100644
--- a/src/validators/Validator.IsUUID.pas
+++ b/src/validators/Validator.IsUUID.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsUppercase.pas b/src/validators/Validator.IsUppercase.pas
index b14f3c2..832b38d 100644
--- a/src/validators/Validator.IsUppercase.pas
+++ b/src/validators/Validator.IsUppercase.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.IsZero.pas b/src/validators/Validator.IsZero.pas
index a6b4203..8c1364b 100644
--- a/src/validators/Validator.IsZero.pas
+++ b/src/validators/Validator.IsZero.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.JSON.Key.IsOptional.pas b/src/validators/Validator.JSON.Key.IsOptional.pas
index 1e77b78..17f6b00 100644
--- a/src/validators/Validator.JSON.Key.IsOptional.pas
+++ b/src/validators/Validator.JSON.Key.IsOptional.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.JSON.Key.IsRequired.pas b/src/validators/Validator.JSON.Key.IsRequired.pas
index 323a403..32aba98 100644
--- a/src/validators/Validator.JSON.Key.IsRequired.pas
+++ b/src/validators/Validator.JSON.Key.IsRequired.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.JSON.SubValidator.Custom.pas b/src/validators/Validator.JSON.SubValidator.Custom.pas
new file mode 100644
index 0000000..c2619e2
--- /dev/null
+++ b/src/validators/Validator.JSON.SubValidator.Custom.pas
@@ -0,0 +1,126 @@
+{
+ ********************************************************************************
+
+ Github - https://github.com/dliocode/datavalidator
+
+ ********************************************************************************
+
+ MIT License
+
+ Copyright (c) 2022 Danilo Lucas
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE.
+
+ ********************************************************************************
+}
+
+unit Validator.JSON.SubValidator.Custom;
+
+interface
+
+uses
+ DataValidator.ItemBase, DataValidator.Intf,
+ System.SysUtils, System.JSON;
+
+type
+ TValidatorJSONSubValidatorCustom = class(TDataValidatorItemBase, IDataValidatorItem)
+ private
+ FCustomJSONSubValidatorExecute: TDataValidatorCustomJSONSubValidator;
+ FCustomJSONSubValidatorMessageExecute: TDataValidatorCustomJSONSubValidatorMessage;
+ FCustomJSONSubMessageExecute: TDataValidatorCustomJSONSubMessage;
+ public
+ function Check: IDataValidatorResult;
+ constructor Create(
+ const ACustomJSONSubValidatorExecute: TDataValidatorCustomJSONSubValidator;
+ const ACustomJSONSubValidatorMessageExecute: TDataValidatorCustomJSONSubValidatorMessage;
+ const ACustomJSONSubMessageExecute: TDataValidatorCustomJSONSubMessage;
+
+ const AMessage: string; const AExecute: TDataValidatorInformationExecute = nil);
+ end;
+
+implementation
+
+uses
+ DataValidator.JSON;
+
+{ TValidatorJSONSubValidatorCustom }
+
+constructor TValidatorJSONSubValidatorCustom.Create(
+ const ACustomJSONSubValidatorExecute: TDataValidatorCustomJSONSubValidator;
+ const ACustomJSONSubValidatorMessageExecute: TDataValidatorCustomJSONSubValidatorMessage;
+ const ACustomJSONSubMessageExecute: TDataValidatorCustomJSONSubMessage;
+
+ const AMessage: string; const AExecute: TDataValidatorInformationExecute = nil);
+begin
+ inherited Create;
+
+ FCustomJSONSubValidatorExecute := ACustomJSONSubValidatorExecute;
+ FCustomJSONSubValidatorMessageExecute := ACustomJSONSubValidatorMessageExecute;
+ FCustomJSONSubMessageExecute := ACustomJSONSubMessageExecute;
+
+ SetMessage(AMessage);
+ SetExecute(AExecute);
+end;
+
+function TValidatorJSONSubValidatorCustom.Check: IDataValidatorResult;
+var
+ LValue: string;
+ R: Boolean;
+ LJSONPair: TJSONPair;
+ LMessage: TDataValidatorMessage;
+begin
+ LValue := GetValueAsString;
+ R := False;
+
+ try
+ if not Trim(LValue).IsEmpty then
+ if FValue.IsType then
+ begin
+ LJSONPair := FValue.AsType;
+
+ if Assigned(LJSONPair) then
+ begin
+ if Assigned(FCustomJSONSubValidatorExecute) then
+ R := FCustomJSONSubValidatorExecute(TDataValidatorJSON.Create(LJSONPair.JsonValue))
+ else
+ begin
+ LMessage := GetMessage;
+
+ if Assigned(FCustomJSONSubValidatorMessageExecute) then
+ R := FCustomJSONSubValidatorMessageExecute(TDataValidatorJSON.Create(LJSONPair.JsonValue), LMessage.Message)
+ else
+ if Assigned(FCustomJSONSubMessageExecute) then
+ R := FCustomJSONSubMessageExecute(TDataValidatorJSON.Create(LJSONPair.JsonValue), LMessage);
+
+ SetMessage(LMessage);
+ end;
+
+ LValue := GetValueAsString;
+ end;
+ end;
+ except
+ end;
+
+ if FIsNot then
+ R := not R;
+
+ Result := TDataValidatorResult.Create(R, TDataValidatorInformation.Create(LValue, GetMessage, FExecute));
+end;
+
+end.
diff --git a/src/validators/Validator.JSON.Value.Custom.pas b/src/validators/Validator.JSON.Value.Custom.pas
index c28ff8d..e5e48e9 100644
--- a/src/validators/Validator.JSON.Value.Custom.pas
+++ b/src/validators/Validator.JSON.Value.Custom.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -35,7 +35,7 @@
interface
uses
- DataValidator.ItemBase,
+ DataValidator.ItemBase, DataValidator.Intf,
System.SysUtils, System.JSON;
type
@@ -43,13 +43,14 @@ TValidatorJSONValueCustom = class(TDataValidatorItemBase, IDataValidatorItem)
private
FCustomJSONValueExecute: TDataValidatorCustomJSONValue;
FCustomJSONValueMessageExecute: TDataValidatorCustomJSONValueMessage;
- FCustomJSONValueMessage: TDataValidatorCustomJSONMessage;
+ FCustomJSONMessageExecute: TDataValidatorCustomJSONMessage;
public
function Check: IDataValidatorResult;
constructor Create(
- const ACustomJSONObjectExecute: TDataValidatorCustomJSONValue;
- const ACustomJSONObjectMessageExecute: TDataValidatorCustomJSONValueMessage;
- const ACustomJSONObjectMessage: TDataValidatorCustomJSONMessage;
+ const ACustomJSONValueExecute: TDataValidatorCustomJSONValue;
+ const ACustomJSONValueMessageExecute: TDataValidatorCustomJSONValueMessage;
+ const ACustomJSONMessageMessageExecute: TDataValidatorCustomJSONMessage;
+
const AMessage: string; const AExecute: TDataValidatorInformationExecute = nil);
end;
@@ -58,16 +59,17 @@ implementation
{ TValidatorJSONValueCustom }
constructor TValidatorJSONValueCustom.Create(
- const ACustomJSONObjectExecute: TDataValidatorCustomJSONValue;
- const ACustomJSONObjectMessageExecute: TDataValidatorCustomJSONValueMessage;
- const ACustomJSONObjectMessage: TDataValidatorCustomJSONMessage;
- const AMessage: string; const AExecute: TDataValidatorInformationExecute = nil);
+ const ACustomJSONValueExecute: TDataValidatorCustomJSONValue;
+ const ACustomJSONValueMessageExecute: TDataValidatorCustomJSONValueMessage;
+ const ACustomJSONMessageMessageExecute: TDataValidatorCustomJSONMessage;
+
+ const AMessage: string; const AExecute: TDataValidatorInformationExecute = nil);
begin
inherited Create;
- FCustomJSONValueExecute := ACustomJSONObjectExecute;
- FCustomJSONValueMessageExecute := ACustomJSONObjectMessageExecute;
- FCustomJSONValueMessage := ACustomJSONObjectMessage;
+ FCustomJSONValueExecute := ACustomJSONValueExecute;
+ FCustomJSONValueMessageExecute := ACustomJSONValueMessageExecute;
+ FCustomJSONMessageExecute := ACustomJSONMessageMessageExecute;
SetMessage(AMessage);
SetExecute(AExecute);
@@ -90,6 +92,7 @@ function TValidatorJSONValueCustom.Check: IDataValidatorResult;
LJSONPair := FValue.AsType;
if Assigned(LJSONPair) then
+ begin
if Assigned(FCustomJSONValueExecute) then
R := FCustomJSONValueExecute(LJSONPair.JsonValue)
else
@@ -99,13 +102,14 @@ function TValidatorJSONValueCustom.Check: IDataValidatorResult;
if Assigned(FCustomJSONValueMessageExecute) then
R := FCustomJSONValueMessageExecute(LJSONPair.JsonValue, LMessage.Message)
else
- if Assigned(FCustomJSONValueMessage) then
- R := FCustomJSONValueMessage(LJSONPair.JsonValue, LMessage);
+ if Assigned(FCustomJSONMessageExecute) then
+ R := FCustomJSONMessageExecute(LJSONPair.JsonValue, LMessage);
SetMessage(LMessage);
end;
- LValue := GetValueAsString;
+ LValue := GetValueAsString;
+ end;
end;
except
end;
diff --git a/src/validators/Validator.JSON.Value.MinItems.pas b/src/validators/Validator.JSON.Value.IsJSONValue.pas
similarity index 66%
rename from src/validators/Validator.JSON.Value.MinItems.pas
rename to src/validators/Validator.JSON.Value.IsJSONValue.pas
index 90a5893..f1a358d 100644
--- a/src/validators/Validator.JSON.Value.MinItems.pas
+++ b/src/validators/Validator.JSON.Value.IsJSONValue.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -30,7 +30,7 @@
********************************************************************************
}
-unit Validator.JSON.Value.MinItems;
+unit Validator.JSON.Value.IsJSONValue;
interface
@@ -39,29 +39,31 @@ interface
System.JSON, System.SysUtils;
type
- TDataValidatorJSONValueMinItems = class(TDataValidatorItemBase, IDataValidatorItem)
+ TTypeJSONValue = (tjNull, tjBoolean, tjNumeric, tjString);
+
+ TDataValidatorJSONValueIsJSONValue = class(TDataValidatorItemBase, IDataValidatorItem)
private
- FMinItems: Integer;
+ FTypeJSONValue: TTypeJSONValue;
public
function Check: IDataValidatorResult;
- constructor Create(const AMinItems: Integer; const AMessage: string; const AExecute: TDataValidatorInformationExecute = nil);
+ constructor Create(const ATypeJSONValue: TTypeJSONValue; const AMessage: string; const AExecute: TDataValidatorInformationExecute = nil);
end;
implementation
-{ TDataValidatorJSONValueMinItems }
+{ TDataValidatorJSONValueIsJSONValue }
-constructor TDataValidatorJSONValueMinItems.Create(const AMinItems: Integer; const AMessage: string; const AExecute: TDataValidatorInformationExecute = nil);
+constructor TDataValidatorJSONValueIsJSONValue.Create(const ATypeJSONValue: TTypeJSONValue; const AMessage: string; const AExecute: TDataValidatorInformationExecute = nil);
begin
inherited Create;
- FMinItems := AMinItems;
+ FTypeJSONValue := ATypeJSONValue;
SetMessage(AMessage);
SetExecute(AExecute);
end;
-function TDataValidatorJSONValueMinItems.Check: IDataValidatorResult;
+function TDataValidatorJSONValueIsJSONValue.Check: IDataValidatorResult;
var
LValue: string;
R: Boolean;
@@ -76,13 +78,19 @@ function TDataValidatorJSONValueMinItems.Check: IDataValidatorResult;
LJSONPair := FValue.AsType;
if Assigned(LJSONPair) then
- begin
- if LJSONPair.JsonValue is TJSONArray then
- R := (LJSONPair.JsonValue as TJSONArray).Count >= FMinItems
- else
- if LJSONPair.JsonValue is TJSONObject then
- R := (LJSONPair.JsonValue as TJSONObject).Count >= FMinItems
- end;
+ case FTypeJSONValue of
+ tjNull:
+ R := LJSONPair.JsonValue is TJSONNull;
+
+ tjBoolean:
+ R := LJSONPair.JsonValue is TJSONBool;
+
+ tjNumeric:
+ R := LJSONPair.JsonValue is TJSONNumber;
+
+ tjString:
+ R := LJSONPair.JsonValue is TJSONString;
+ end;
end;
if FIsNot then
diff --git a/src/validators/Validator.JSON.Value.MaxItems.pas b/src/validators/Validator.JSON.Value.IsMinMaxItems.pas
similarity index 65%
rename from src/validators/Validator.JSON.Value.MaxItems.pas
rename to src/validators/Validator.JSON.Value.IsMinMaxItems.pas
index 5879ddf..1dbe275 100644
--- a/src/validators/Validator.JSON.Value.MaxItems.pas
+++ b/src/validators/Validator.JSON.Value.IsMinMaxItems.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -30,7 +30,7 @@
********************************************************************************
}
-unit Validator.JSON.Value.MaxItems;
+unit Validator.JSON.Value.IsMinMaxItems;
interface
@@ -39,33 +39,38 @@ interface
System.JSON, System.SysUtils;
type
- TDataValidatorJSONValueMaxItems = class(TDataValidatorItemBase, IDataValidatorItem)
+ TTypeJSONValueMinMax = (tmMin, tmMax);
+
+ TDataValidatorJSONValueIsMinMaxItems = class(TDataValidatorItemBase, IDataValidatorItem)
private
- FMaxItems: Integer;
+ FTypeMinMax: TTypeJSONValueMinMax;
+ FTotalItems: Integer;
public
function Check: IDataValidatorResult;
- constructor Create(const AMaxItems: Integer; const AMessage: string; const AExecute: TDataValidatorInformationExecute = nil);
+ constructor Create(const ATypeMinMax: TTypeJSONValueMinMax; const ATotalItems: Integer; const AMessage: string; const AExecute: TDataValidatorInformationExecute = nil);
end;
implementation
-{ TDataValidatorJSONValueMaxItems }
+{ TDataValidatorJSONValueIsMinMaxItems }
-constructor TDataValidatorJSONValueMaxItems.Create(const AMaxItems: Integer; const AMessage: string; const AExecute: TDataValidatorInformationExecute = nil);
+constructor TDataValidatorJSONValueIsMinMaxItems.Create(const ATypeMinMax: TTypeJSONValueMinMax; const ATotalItems: Integer; const AMessage: string; const AExecute: TDataValidatorInformationExecute = nil);
begin
inherited Create;
- FMaxItems := AMaxItems;
+ FTypeMinMax := ATypeMinMax;
+ FTotalItems := ATotalItems;
SetMessage(AMessage);
SetExecute(AExecute);
end;
-function TDataValidatorJSONValueMaxItems.Check: IDataValidatorResult;
+function TDataValidatorJSONValueIsMinMaxItems.Check: IDataValidatorResult;
var
LValue: string;
R: Boolean;
LJSONPair: TJSONPair;
+ LCountItems: Integer;
begin
LValue := GetValueAsString;
R := False;
@@ -77,11 +82,20 @@ function TDataValidatorJSONValueMaxItems.Check: IDataValidatorResult;
if Assigned(LJSONPair) then
begin
+ LCountItems := 0;
+
if LJSONPair.JsonValue is TJSONArray then
- R := (LJSONPair.JsonValue as TJSONArray).Count <= FMaxItems
+ LCountItems := (LJSONPair.JsonValue as TJSONArray).Count
else
if LJSONPair.JsonValue is TJSONObject then
- R := (LJSONPair.JsonValue as TJSONObject).Count <= FMaxItems
+ LCountItems := (LJSONPair.JsonValue as TJSONObject).Count;
+
+ case FTypeMinMax of
+ tmMin:
+ R := LCountItems >= FTotalItems;
+ tmMax:
+ R := LCountItems <= FTotalItems;
+ end;
end;
end;
diff --git a/src/validators/Validator.JSON.Value.IsNull.pas b/src/validators/Validator.JSON.Value.IsNull.pas
deleted file mode 100644
index 5fa43d6..0000000
--- a/src/validators/Validator.JSON.Value.IsNull.pas
+++ /dev/null
@@ -1,85 +0,0 @@
-{
- ********************************************************************************
-
- Github - https://github.com/dliocode/datavalidator
-
- ********************************************************************************
-
- MIT License
-
- Copyright (c) 2021 Danilo Lucas
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-
- ********************************************************************************
-}
-
-unit Validator.JSON.Value.IsNull;
-
-interface
-
-uses
- DataValidator.ItemBase,
- System.JSON, System.SysUtils;
-
-type
- TDataValidatorJSONValueIsNull = class(TDataValidatorItemBase, IDataValidatorItem)
- private
- public
- function Check: IDataValidatorResult;
- constructor Create(const AMessage: string; const AExecute: TDataValidatorInformationExecute = nil);
- end;
-
-implementation
-
-{ TDataValidatorJSONValueIsNull }
-
-constructor TDataValidatorJSONValueIsNull.Create(const AMessage: string; const AExecute: TDataValidatorInformationExecute = nil);
-begin
- inherited Create;
-
- SetMessage(AMessage);
- SetExecute(AExecute);
-end;
-
-function TDataValidatorJSONValueIsNull.Check: IDataValidatorResult;
-var
- LValue: string;
- R: Boolean;
- LJSONPair: TJSONPair;
-begin
- LValue := GetValueAsString;
- R := False;
-
- if not Trim(LValue).IsEmpty then
- if FValue.IsType then
- begin
- LJSONPair := FValue.AsType;
-
- if Assigned(LJSONPair) then
- R := LJSONPair.JsonValue is TJSONNull;
- end;
-
- if FIsNot then
- R := not R;
-
- Result := TDataValidatorResult.Create(R, TDataValidatorInformation.Create(LValue, GetMessage, FExecute));
-end;
-
-end.
diff --git a/src/validators/Validator.Regex.IsMatch.pas b/src/validators/Validator.Regex.IsMatch.pas
index 048a2c2..67d4b38 100644
--- a/src/validators/Validator.Regex.IsMatch.pas
+++ b/src/validators/Validator.Regex.IsMatch.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/validators/Validator.StartsWith.pas b/src/validators/Validator.StartsWith.pas
index bc6aef1..edf2c9a 100644
--- a/src/validators/Validator.StartsWith.pas
+++ b/src/validators/Validator.StartsWith.pas
@@ -7,7 +7,7 @@
MIT License
- Copyright (c) 2021 Danilo Lucas
+ Copyright (c) 2022 Danilo Lucas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal