Miscellaneous
hasErrors()
Signature
Section titled “Signature”hasErrors() — returns any
Description
Section titled “Description”Returns true if the object has any errors. You can also limit to only check a specific property or name for errors.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
property | string | yes | — | Name of the property to check if there are any errors set on. |
name | string | yes | — | Error name to check if there are any errors set with. |
Examples
Section titled “Examples”hasErrors([ property, name ]) <!--- Check if the post object has any errors set on it --->
<cfif post.hasErrors()>
<!--- Send user to a form to correct the errors... --->
</cfif>