Skip to content

Commit 8c4707b

Browse files
committed
- eurodate doesn't event work in ACF/Lucee as it uses just a single standard. Remove it so the user can validate as they see fit.
1 parent acea8c1 commit 8c4707b

File tree

7 files changed

+14
-20
lines changed

7 files changed

+14
-20
lines changed

changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
## [Unreleased]
1111

12+
### Removed
13+
14+
- `eurodate` doesn't event work in ACF/Lucee as it uses just a single standard. Remove it so the user can validate as they see fit.
15+
1216
### Added
1317

1418
- BoxLang certification

models/ValidationManager.cfc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* // required or not
1919
* required : boolean [false]
2020
* // type constraint
21-
* type : (ssn,email,url,alpha,boolean,date,usdate,eurodate,numeric,GUID,UUID,integer,[string],telephone,zipcode,ipaddress,creditcard,binary,component,query,struct,json,xml),
21+
* type : (ssn,email,url,alpha,boolean,date,usdate,numeric,GUID,UUID,integer,[string],telephone,zipcode,ipaddress,creditcard,binary,component,query,struct,json,xml),
2222
* // size or length of the value (struct,string,array,query)
2323
* size : numeric or range, eg: 10 or 6..8
2424
* // range is a range of values the property value should exist in

models/validators/TypeValidator.cfc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ component extends="BaseValidator" accessors="true" singleton {
1111
*/
1212
TypeValidator function init(){
1313
variables.name = "Type";
14-
variables.validTypes = "alpha,array,binary,boolean,component,creditcard,date,email,eurodate,float,GUID,integer,ipaddress,json,numeric,query,ssn,string,struct,telephone,url,usdate,UUID,xml,zipcode";
14+
variables.validTypes = "alpha,array,binary,boolean,component,creditcard,date,email,float,GUID,integer,ipaddress,json,numeric,query,ssn,string,struct,telephone,url,usdate,UUID,xml,zipcode";
1515

1616
return this;
1717
}
@@ -83,10 +83,6 @@ component extends="BaseValidator" accessors="true" singleton {
8383
r = isValid( "usdate", arguments.targetValue );
8484
break;
8585
}
86-
case "eurodate": {
87-
r = isValid( "eurodate", arguments.targetValue );
88-
break;
89-
}
9086
case "numeric": {
9187
r = isValid( "numeric", arguments.targetValue );
9288
break;

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ this.constraints = {
211211
size : numeric or range, eg: 10 or 6..8
212212

213213
// specific type constraint, one in the list.
214-
type : (alpha,array,binary,boolean,component,creditcard,date,email,eurodate,float,GUID,integer,ipaddress,json,numeric,query,ssn,string,struct,telephone,url,usdate,UUID,xml,zipcode),
214+
type : (alpha,array,binary,boolean,component,creditcard,date,email,float,GUID,integer,ipaddress,json,numeric,query,ssn,string,struct,telephone,url,usdate,UUID,xml,zipcode),
215215

216216
// UDF to use for validation, must return boolean accept the incoming value and target object, validate(value,target):boolean
217217
udf = variables.UDF or this.UDF or a closure.

[email protected]

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name":"cbvalidation-adobe@2023",
33
"app":{
44
"serverHomeDirectory":".engine/adobe2023",
5-
"cfengine":"adobe@2023.0.0-beta.1"
5+
"cfengine":"adobe@2023"
66
},
77
"web":{
88
"http":{
@@ -11,19 +11,19 @@
1111
"rewrites":{
1212
"enable":"true"
1313
},
14-
"webroot": "test-harness",
15-
"aliases":{
16-
"/moduleroot/cbvalidation":"../"
14+
"webroot":"test-harness",
15+
"aliases":{
16+
"/moduleroot/cbvalidation":"./"
1717
}
1818
},
19-
"jvm":{
19+
"jvm":{
2020
"heapSize":"1024"
2121
},
2222
"openBrowser":"false",
2323
"cfconfig": {
2424
"file" : ".cfconfig.json"
2525
},
26-
"scripts" : {
26+
"scripts" : {
2727
"onServerInstall":"cfpm install zip,debugger"
2828
}
2929
}

test-harness/tests/resources/ValidationManager.cfc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* // required or not
1919
* required : boolean [false]
2020
* // type constraint
21-
* type : (ssn,email,url,alpha,boolean,date,usdate,eurodate,numeric,GUID,UUID,integer,[string],telephone,zipcode,ipaddress,creditcard,binary,component,query,struct,json,xml),
21+
* type : (ssn,email,url,alpha,boolean,date,usdate,numeric,GUID,UUID,integer,[string],telephone,zipcode,ipaddress,creditcard,binary,component,query,struct,json,xml),
2222
* // size or length of the value (struct,string,array,query)
2323
* size : numeric or range, eg: 10 or 6..8
2424
* // range is a range of values the property value should exist in

test-harness/tests/specs/validators/TypeValidatorTest.cfc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,6 @@ component extends="coldbox.system.testing.BaseModelTest" model="cbvalidation.mod
6666
r = model.validate( result, this, "test", "01/01/2012", "usdate" );
6767
assertEquals( true, r );
6868

69-
// eurodate
70-
r = model.validate( result, this, "test", "1aa", "eurodate" );
71-
assertEquals( false, r );
72-
r = model.validate( result, this, "test", "23/01/2012", "eurodate" );
73-
assertEquals( true, r );
74-
7569
// numeric
7670
r = model.validate( result, this, "test", "1aa", "numeric" );
7771
assertEquals( false, r );

0 commit comments

Comments
 (0)