You are viewing documentation for v1.0.x. Change

addError()

Description

Adds an error on a specific property.

Function Syntax

addError(property, message [, name ])

Parameters

Parameter Type Required Default Description
property string Yes The name of the property you want to add an error for.
message string Yes The error message (such as "Please enter a correct name in the form field" for example).
name string No A name to identify the error by (useful when you need to distinguish one error from another one set on the same object and you don't want to use the error message itself for that).

Examples

<!--- Add an error to the `email` property --->
<cfset addError(property="email", message="Sorry, you are not allowed to use that email, try again please.")>