Skip to content

Commit e87a317

Browse files
committed
Added float to the type validator which was missing
1 parent cfdd912 commit e87a317

File tree

4 files changed

+56
-24
lines changed

4 files changed

+56
-24
lines changed

.cfformat.json

Lines changed: 48 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,56 @@
11
{
2-
"brackets.padding": true,
3-
"strings.quote": "double",
4-
"strings.attributes.quote": "double",
2+
"array.empty_padding": false,
3+
"array.padding": true,
4+
"array.multiline.min_length": 40,
5+
"array.multiline.element_count": 4,
6+
"array.multiline.leading_comma.padding": true,
7+
"array.multiline.leading_comma": false,
8+
"alignment.consecutive.assignments": true,
9+
"alignment.consecutive.properties": true,
10+
"alignment.consecutive.params": true,
11+
"brackets.padding": true,
12+
"comment.asterisks": "align",
13+
"binary_operators.padding": true,
14+
"for_loop_semicolons.padding": true,
515
"function_call.empty_padding": false,
6-
"function_call.padding": true,
7-
"function_declaration.padding": true,
16+
"function_call.padding": true,
817
"function_call.multiline.leading_comma.padding": true,
9-
"function_declaration.multiline.leading_comma.padding" : true,
18+
"function_call.casing.builtin": "cfdocs",
19+
"function_call.casing.userdefined": "",
20+
"function_call.multiline.element_count": 4,
21+
"function_call.multiline.leading_comma": false,
22+
"function_call.multiline.min_length": 40,
23+
"function_declaration.padding": true,
1024
"function_declaration.empty_padding": false,
25+
"function_declaration.multiline.leading_comma": false,
26+
"function_declaration.multiline.leading_comma.padding": true,
27+
"function_declaration.multiline.element_count": 4,
28+
"function_declaration.multiline.min_length": 40,
1129
"function_declaration.group_to_block_spacing": "compact",
30+
"function_anonymous.empty_padding": false,
31+
"function_anonymous.group_to_block_spacing": "compact",
32+
"function_anonymous.multiline.element_count": 4,
33+
"function_anonymous.multiline.leading_comma": false,
34+
"function_anonymous.multiline.leading_comma.padding": true,
35+
"function_anonymous.multiline.min_length": 40,
36+
"function_anonymous.padding": true,
37+
"indent_size": 4,
38+
"keywords.block_to_keyword_spacing": "spaced",
39+
"keywords.group_to_block_spacing": "spaced",
40+
"keywords.padding_inside_group": true,
41+
"keywords.spacing_to_block": "spaced",
42+
"keywords.spacing_to_group": true,
43+
"keywords.empty_group_spacing": false,
44+
"max_columns": 120,
45+
"parentheses.padding": true,
46+
"strings.quote": "double",
47+
"strings.attributes.quote": "double",
48+
"struct.separator": " : ",
1249
"struct.padding": true,
1350
"struct.empty_padding": false,
14-
"struct.multiline.leading_comma.padding" : true,
15-
"array.empty_padding":false,
16-
"array.padding":true,
17-
"array.multiline.leading_comma.padding":true,
18-
"binary_operators.padding":true,
19-
"for_loop_semicolons.padding":true,
20-
"indent_size":4,
21-
"parentheses.padding":true,
22-
"struct.separator":" : ",
23-
"tab_indent":true,
24-
"keywords.block_to_keyword_spacing" : "spaced",
25-
"keywords.group_to_block_spacing" : "spaced",
26-
"keywords.padding_inside_group" : true,
27-
"keywords.spacing_to_block" : "compact",
28-
"keywords.spacing_to_group" : true
51+
"struct.multiline.leading_comma": false,
52+
"struct.multiline.leading_comma.padding": true,
53+
"struct.multiline.element_count": 4,
54+
"struct.multiline.min_length": 40,
55+
"tab_indent": true
2956
}

box.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name":"ColdBox Validation",
33
"author":"Ortus Solutions <[email protected]>",
4-
"version":"1.6.0",
4+
"version":"1.5.2",
55
"location":"https://downloads.ortussolutions.com/ortussolutions/coldbox-modules/cbvalidation/@build.version@/[email protected]@.zip",
66
"slug":"cbvalidation",
77
"type":"modules",

changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## 1.5.2
4+
5+
* `bug` : Added `float` to the type validator which was missing
6+
37
## 1.5.1
48

59
* `bug` : This version's mixin is causing errors because its looking for this.validate() and its looking in the handler, not in the mixin file itself.

models/validators/TypeValidator.cfc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ component accessors="true" implements="cbvalidation.models.validators.IValidator
1010
property name="name";
1111

1212
TypeValidator function init(){
13-
name = "Type";
14-
validTypes = "ssn,email,url,alpha,boolean,date,usdate,eurodate,numeric,GUID,UUID,integer,string,telephone,zipcode,ipaddress,creditcard,binary,component,query,struct,array,json,xml";
13+
name = "Type";
14+
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";
1515
return this;
1616
}
1717

@@ -35,6 +35,7 @@ component accessors="true" implements="cbvalidation.models.validators.IValidator
3535
var r = false;
3636

3737
switch( arguments.validationData ){
38+
case "float" : { r = isValid("float",arguments.targetValue); break; }
3839
case "ssn" : { r = isValid("ssn",arguments.targetValue); break; }
3940
case "email" : { r = isValid("email",arguments.targetValue); break; }
4041
case "url" : { r = isValid("url",arguments.targetValue); break; }

0 commit comments

Comments
 (0)