From d58217fabfc8ca12392865747153cf424e3b96cf Mon Sep 17 00:00:00 2001 From: Russel Cole Date: Mon, 23 Sep 2024 14:19:44 +0100 Subject: [PATCH] VALIDATION-7 fix indentation --- .../validation/ValidationExtrasValidators.cfc | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/services/validation/ValidationExtrasValidators.cfc b/services/validation/ValidationExtrasValidators.cfc index bdf5482..33f477e 100644 --- a/services/validation/ValidationExtrasValidators.cfc +++ b/services/validation/ValidationExtrasValidators.cfc @@ -51,16 +51,16 @@ component { , required struct data , required string otherFields , any value = "" - ) validatorMessage="cms:validation.conditional.required.default" { - for ( var otherField in ListToArray( otherFields ) ) { - if ( len( arguments.data[ otherField ] ?: "" ) ) { - return true; - } - } - return arguments.data.keyExists( fieldName ) && !IsEmpty( value ); - } - - public string function requiredIfOtherFieldsEmpty_js() validatorMessage="cms:validation.conditional.required.default" { + ) validatorMessage="cms:validation.conditional.required.default" { + for ( var otherField in ListToArray( otherFields ) ) { + if ( len( arguments.data[ otherField ] ?: "" ) ) { + return true; + } + } + return arguments.data.keyExists( fieldName ) && !IsEmpty( value ); + } + + public string function requiredIfOtherFieldsEmpty_js() validatorMessage="cms:validation.conditional.required.default" { return "function( value, el, params ){ var otherFields = params[0].split(','); for ( var i=0; i 0 ); }"; - } + } public boolean function requiredIfOtherFieldNotEmpty( required string fieldName, any value="", required struct data, required string otherField ) validatorMessage="cms:validation.conditional.required.default" { if ( !len( arguments.data[ arguments.otherField ] ?: "" ) ) {