Skip to content

Commit dd7fbb1

Browse files
committed
Reversing some changes, added spacing
1 parent 76e21f9 commit dd7fbb1

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

modules/cbvalidation/models/IValidationManager.cfc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ interface{
1818
* @excludeFields.hint An optional list of fields to exclude from the validation.
1919
* @includeFields.hint An optional list of fields to include in the validation.
2020
*/
21-
IValidationResult function validate(required any target, string fields, any constraints, string locale="", string excludeFields="", string includeFields="");
21+
IValidationResult function validate( required any target, string fields, any constraints, string locale="", string excludeFields="", string includeFields="" );
2222

2323
/**
2424
* Retrieve the shared constraints

modules/cbvalidation/models/ValidationManager.cfc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ component accessors="true" serialize="false" implements="IValidationManager" sin
9191
* @excludeFields.hint An optional list of fields to exclude from the validation.
9292
* @IncludeFields.hint An optional list of fields to include in the validation.
9393
*/
94-
IValidationResult function validate(required any target, string fields="*", any constraints="", string locale="", string excludeFields="", string includeFields=""){
94+
IValidationResult function validate( required any target, string fields="*", any constraints="", string locale="", string excludeFields="", string includeFields="" ){
9595
var targetName = "";
9696

9797
// Do we have a real object or a structure?
@@ -131,9 +131,9 @@ component accessors="true" serialize="false" implements="IValidationManager" sin
131131
}
132132
if( validateField ){
133133
// verify we can validate the field described in the constraint
134-
if( arguments.fields == "*" || listFindNoCase(arguments.fields, thisField) ) {
134+
if( arguments.fields == "*" || listFindNoCase( arguments.fields, thisField ) ) {
135135
// process the validation rules on the target field using the constraint validation data
136-
processRules(results=results, rules=allConstraints[thisField], target=arguments.target, field=thisField, locale=arguments.locale);
136+
processRules( results=results, rules=allConstraints[ thisField ], target=arguments.target, field=thisField, locale=arguments.locale );
137137
}
138138
}
139139

@@ -149,7 +149,7 @@ component accessors="true" serialize="false" implements="IValidationManager" sin
149149
// process the incoming rules
150150
for( var key in arguments.rules ){
151151
// if message validators, just ignore
152-
if( reFindNoCase( "^(#replace( variables.validValidators, ",", "|", "all" )#)Message$", key ) ){ continue; }
152+
if( reFindNoCase( "Message$", key ) ){ continue; }
153153
// if not in list, ignore
154154
if( !listFindNoCase( variables.validValidators, key ) ){ continue; }
155155

@@ -190,6 +190,7 @@ component accessors="true" serialize="false" implements="IValidationManager" sin
190190
return wirebox.getInstance( arguments.validationData );
191191
}
192192
default : {
193+
if ( wirebox.getBinder().mappingExists( validatorType ) ) { return wirebox.getInstance( validatorType ); }
193194
throw(message="The validator you requested #arguments.validatorType# is not a valid validator",type="ValidationManager.InvalidValidatorType");
194195
}
195196
}

0 commit comments

Comments
 (0)