Displaying Errors
Handlers:
// store the validation results in the request collection
prc.validationResults = validate( obj );Views:
<-- Display all errors as a message box --->
#getInstance( "MessageBox@cbMessagebox" )
.renderMessage( type="error", messageArray=prc.validationResults.getAllErrors() )#<cfif prc.validationResults.hasErrors()>
<ul>
<cfloop array="#prc.validationResults.getErrors()#" index="thisError">
<li>#thisError.getMessage()#</li>
</cfloop>
</ul>
</cfif>Functional Approach
Common Methods
Last updated
Was this helpful?