Skip to content

Miscellaneous

errorMessageOn()

errorMessageOn() — returns any

Returns the error message, if one exists, on the object’s property. If multiple error messages exist, the first one is returned.

NameTypeRequiredDefaultDescription
objectNamestringyesThe variable name of the object to display the error message for.
propertystringyesThe name of the property to display the error message for.
prependTextstringyesString to prepend to the error message.
appendTextstringyesString to append to the error message.
wrapperElementstringyesspanHTML element to wrap the error message in.
classstringyeserrorMessageCSS class to set on the wrapper element.
errorMessageOn(objectName, property [, prependText, appendText, wrapperElement, class ]) <!--- view code --->
<cfoutput>
  #errorMessageOn(objectName="user", property="email")#
</cfoutput>