Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

account for empty spaces in the property in the propertyHasValue() me…

…thod
  • Loading branch information...
commit 3209e8dbfa6218fc6bf1a98473f906a08a122cd8 1 parent 49b3bdd
@tony-garcia authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  ValidateThis/core/Validation.cfc
View
2  ValidateThis/core/Validation.cfc
@@ -92,7 +92,7 @@
<cffunction name="propertyHasValue" returntype="boolean" access="public" output="false" hint="I determine whether the property that the validation references has a value.">
<cfargument name="propertyName" type="any" required="false" default="#getPropertyName()#" />
<cfset var theVal = getObjectValue(arguments.propertyName) />
- <cfreturn (isSimpleValue(theVal) and len(theVal) gt 0) or (isStruct(theVal) and structCount(theVal) gt 0) or (isArray(theVal) and arrayLen(theVal) gt 0)/>
+ <cfreturn (isSimpleValue(theVal) and len(trim(theVal)) gt 0) or (isStruct(theVal) and structCount(theVal) gt 0) or (isArray(theVal) and arrayLen(theVal) gt 0)/>
</cffunction>
<cffunction name="propertyExists" returntype="boolean" access="public" output="false" hint="I report whether a property exists in the object being validated.">
Please sign in to comment.
Something went wrong with that request. Please try again.