Skip to content

Commit d3a8a8a

Browse files
authored
Merge pull request #204 from CauanCabral/feature/ValidationDateNumber
Implement methods to validate date and decimal on localized form
2 parents 7449d9f + 1df3f1d commit d3a8a8a

42 files changed

Lines changed: 446 additions & 1 deletion

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
},
1919
"require": {
2020
"php": ">=7.2",
21-
"cakephp/cakephp": "^4.0.0"
21+
"cakephp/cakephp": "^4.1.0"
2222
},
2323
"require-dev": {
2424
"cakephp/cakephp-codesniffer": "^4.0",

src/Validation/AtValidation.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@
2424
*/
2525
class AtValidation extends LocalizedValidation
2626
{
27+
/**
28+
* Define locale to be used by that localized
29+
* validation set
30+
*
31+
* @var string
32+
*/
33+
protected static $validationLocale = 'de_AT';
34+
2735
/**
2836
* Checks a postal code.
2937
*

src/Validation/AuValidation.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@
2424
*/
2525
class AuValidation extends LocalizedValidation
2626
{
27+
/**
28+
* Define locale to be used by that localized
29+
* validation set
30+
*
31+
* @var string
32+
*/
33+
protected static $validationLocale = 'en_AU';
34+
2735
/**
2836
* Checks a postal code for Australia.
2937
*

src/Validation/BdValidation.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@
2424
*/
2525
class BdValidation extends LocalizedValidation
2626
{
27+
/**
28+
* Define locale to be used by that localized
29+
* validation set
30+
*
31+
* @var string
32+
*/
33+
protected static $validationLocale = 'bn_BD';
34+
2735
/**
2836
* Checks a postal code.
2937
*

src/Validation/BeValidation.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@
2424
*/
2525
class BeValidation extends LocalizedValidation
2626
{
27+
/**
28+
* Define locale to be used by that localized
29+
* validation set
30+
*
31+
* @var string
32+
*/
33+
protected static $validationLocale = 'nl_BE';
34+
2735
/**
2836
* Checks a postal code for Belgium.
2937
*

src/Validation/BrValidation.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@
2222
*/
2323
class BrValidation extends LocalizedValidation
2424
{
25+
/**
26+
* Define locale to be used by that localized
27+
* validation set
28+
*
29+
* @var string
30+
*/
31+
protected static $validationLocale = 'pt_BR';
32+
2533
/**
2634
* Checks a phone number for Brazil.
2735
*

src/Validation/CaValidation.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@
2424
*/
2525
class CaValidation extends LocalizedValidation
2626
{
27+
/**
28+
* Define locale to be used by that localized
29+
* validation set
30+
*
31+
* @var string
32+
*/
33+
protected static $validationLocale = 'en_CA';
34+
2735
/**
2836
* Checks a postal code for Canada.
2937
*

src/Validation/ChValidation.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@
2424
*/
2525
class ChValidation extends LocalizedValidation
2626
{
27+
/**
28+
* Define locale to be used by that localized
29+
* validation set
30+
*
31+
* @var string
32+
*/
33+
protected static $validationLocale = 'de_CH';
34+
2735
/**
2836
* Checks a postal code for Switzerland & Liechtenstein
2937
*

src/Validation/CnValidation.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@
2222
*/
2323
class CnValidation extends LocalizedValidation
2424
{
25+
/**
26+
* Define locale to be used by that localized
27+
* validation set
28+
*
29+
* @var string
30+
*/
31+
protected static $validationLocale = 'zh_CN';
32+
2533
/**
2634
* Checks phone numbers for The Peoples Republic of China (mainland)
2735
*

src/Validation/CzValidation.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@
2424
*/
2525
class CzValidation extends LocalizedValidation
2626
{
27+
/**
28+
* Define locale to be used by that localized
29+
* validation set
30+
*
31+
* @var string
32+
*/
33+
protected static $validationLocale = 'cs_CZ';
34+
2735
/**
2836
* Checks a postal code for Czech Republic
2937
*

0 commit comments

Comments
 (0)