Skip to content

Miscellaneous

errorMessagesFor()

errorMessagesFor() — returns any

Builds and returns a list (ul tag with a default class of errorMessages) containing all the error messages for all the properties of the object (if any). Returns an empty string otherwise.

NameTypeRequiredDefaultDescription
objectNamestringyesThe variable name of the object to display error messages for.
classstringyeserrorMessageCSS class to set on the ul element.
showDuplicatesbooleanyestrueWhether or not to show duplicate error messages.
errorMessagesFor(objectName [, class, showDuplicates ]) <!--- view code --->
<cfoutput>
    #errorMessagesFor(objectName="user")#
</cfoutput>