 	</cfscript>
 </cffunction>
 
-<cffunction name="validatesInclusionOf" returntype="void" access="public" output="false" hint="Validates that the value of the specified property exists in the supplied list.">
-	<cfargument name="properties" type="string" required="false" default="" hint="See documentation for `validatesExclusionOf`">
-	<cfargument name="list" type="string" required="true" hint="List of allowed values">
-	<cfargument name="message" type="string" required="false" default="#application.wheels.functions.validatesInclusionOf.message#" hint="See documentation for `validatesExclusionOf`">
-	<cfargument name="when" type="string" required="false" default="onSave" hint="See documentation for `validatesExclusionOf`">
-	<cfargument name="allowBlank" type="boolean" required="false" default="#application.wheels.functions.validatesInclusionOf.allowBlank#" hint="See documentation for `validatesExclusionOf`">
-	<cfargument name="if" type="string" required="false" default="" hint="See documentation for `validatesExclusionOf`">
-	<cfargument name="unless" type="string" required="false" default="" hint="See documentation for `validatesExclusionOf`">
+<cffunction name="validatesInclusionOf" returntype="void" access="public" output="false"
+	hint="Validates that the value of the specified property exists in the supplied list."
+	examples=
+	'
+		<!--- In models/User.cfc --->
+		<cffunction name="init">
+			<!--- Make sure that the user selects either "Wheels" or "Rails" as their framework --->
+  			<cfset validatesInclusionOf(property="frameworkOfChoice", list="wheels,rails", message="Please try again and this time select a decent framework.")>
+		</cffunction>
+	'
+	categories="model-initialization" chapters="object-validation" functions="validatesConfirmationOf,validatesExclusionOf,validatesFormatOf,validatesLengthOf,validatesNumericalityOf,validatesPresenceOf,validatesUniquenessOf">
+	<cfargument name="properties" type="string" required="false" default="" hint="See documentation for @validatesConfirmationOf.">
+	<cfargument name="list" type="string" required="true" hint="List of allowed values.">
+	<cfargument name="message" type="string" required="false" default="#application.wheels.functions.validatesInclusionOf.message#" hint="See documentation for @validatesConfirmationOf.">
+	<cfargument name="when" type="string" required="false" default="onSave" hint="See documentation for @validatesConfirmationOf.">
+	<cfargument name="allowBlank" type="boolean" required="false" default="#application.wheels.functions.validatesInclusionOf.allowBlank#" hint="See documentation for @validatesExclusionOf.">
+	<cfargument name="if" type="string" required="false" default="" hint="See documentation for @validatesConfirmationOf.">
+	<cfargument name="unless" type="string" required="false" default="" hint="See documentation for @validatesConfirmationOf.">
 	<cfscript>
 		arguments.list = Replace(arguments.list, ", ", ",", "all");
 		$registerValidation(methods="$validateInclusionOf", argumentCollection=arguments);
 	</cfscript>
 </cffunction>
 
-<cffunction name="validatesLengthOf" returntype="void" access="public" output="false" hint="Validates that the value of the specified property matches the length requirements supplied. Only one of the `exactly`, `maximum`, `minimum` and `within` arguments can be used at a time.">
-	<cfargument name="properties" type="string" required="false" default="" hint="See documentation for `validatesExclusionOf`">
-	<cfargument name="message" type="string" required="false" default="#application.wheels.functions.validatesLengthOf.message#" hint="See documentation for `validatesExclusionOf`">
-	<cfargument name="when" type="string" required="false" default="onSave" hint="See documentation for `validatesExclusionOf`">
-	<cfargument name="allowBlank" type="boolean" required="false" default="#application.wheels.functions.validatesLengthOf.allowBlank#" hint="See documentation for `validatesExclusionOf`">
-	<cfargument name="exactly" type="numeric" required="false" default="#application.wheels.functions.validatesLengthOf.exactly#" hint="The exact length that the property value has to be">
-	<cfargument name="maximum" type="numeric" required="false" default="#application.wheels.functions.validatesLengthOf.maximum#" hint="The maximum length that the property value has to be">
-	<cfargument name="minimum" type="numeric" required="false" default="#application.wheels.functions.validatesLengthOf.minimum#" hint="The minimum length that the property value has to be">
-	<cfargument name="within" type="string" required="false" default="#application.wheels.functions.validatesLengthOf.within#" hint="A list of two values (minimum and maximum) that the length of the property value has to fall within">
-	<cfargument name="if" type="string" required="false" default="" hint="See documentation for `validatesExclusionOf`">
-	<cfargument name="unless" type="string" required="false" default="" hint="See documentation for `validatesExclusionOf`">
+<cffunction name="validatesLengthOf" returntype="void" access="public" output="false"
+	hint="Validates that the value of the specified property matches the length requirements supplied. Only one of the `exactly`, `maximum`, `minimum` and `within` arguments can be used at a time."
+	examples=
+	'
+		<!--- In models/User.cfc --->
+		<cffunction name="init">
+			<!--- Make sure that the username chosen is not more than 50 characters --->
+  			<cfset validatesLengthOf(property="username", maximum=50, message="Please limit your username to 50 characters please.")>
+		</cffunction>
+	'
+	categories="model-initialization" chapters="object-validation" functions="validatesConfirmationOf,validatesExclusionOf,validatesFormatOf,validatesInclusionOf,validatesNumericalityOf,validatesPresenceOf,validatesUniquenessOf">
+	<cfargument name="properties" type="string" required="false" default="" hint="See documentation for @validatesConfirmationOf.">
+	<cfargument name="message" type="string" required="false" default="#application.wheels.functions.validatesLengthOf.message#" hint="See documentation for @validatesConfirmationOf.">
+	<cfargument name="when" type="string" required="false" default="onSave" hint="See documentation for @validatesConfirmationOf.">
+	<cfargument name="allowBlank" type="boolean" required="false" default="#application.wheels.functions.validatesLengthOf.allowBlank#" hint="See documentation for @validatesExclusionOf.">
+	<cfargument name="exactly" type="numeric" required="false" default="#application.wheels.functions.validatesLengthOf.exactly#" hint="The exact length that the property value has to be.">
+	<cfargument name="maximum" type="numeric" required="false" default="#application.wheels.functions.validatesLengthOf.maximum#" hint="The maximum length that the property value has to be.">
+	<cfargument name="minimum" type="numeric" required="false" default="#application.wheels.functions.validatesLengthOf.minimum#" hint="The minimum length that the property value has to be.">
+	<cfargument name="within" type="string" required="false" default="#application.wheels.functions.validatesLengthOf.within#" hint="A list of two values (minimum and maximum) that the length of the property value has to fall within.">
+	<cfargument name="if" type="string" required="false" default="" hint="See documentation for @validatesConfirmationOf.">
+	<cfargument name="unless" type="string" required="false" default="" hint="See documentation for @validatesConfirmationOf.">
 	<cfscript>
 		if (Len(arguments.within))
 			arguments.within = ListToArray(Replace(arguments.within, ", ", ",", "all"));

	</cfscript>
</cffunction>

<cffunction name="validatesNumericalityOf" returntype="void" access="public" output="false" hint="Validates that the value of the specified property is numeric.">
	<cfargument name="properties" type="string" required="false" default="" hint="See documentation for `validatesExclusionOf`">
	<cfargument name="message" type="string" required="false" default="#application.wheels.functions.validatesNumericalityOf.message#" hint="See documentation for `validatesExclusionOf`">
	<cfargument name="when" type="string" required="false" default="onSave" hint="See documentation for `validatesExclusionOf`">
	<cfargument name="allowBlank" type="boolean" required="false" default="#application.wheels.functions.validatesNumericalityOf.allowBlank#" hint="See documentation for `validatesExclusionOf`">
	<cfargument name="onlyInteger" type="boolean" required="false" default="#application.wheels.functions.validatesNumericalityOf.onlyInteger#" hint="Specifies whether the property value has to be an integer">
	<cfargument name="if" type="string" required="false" default="" hint="See documentation for `validatesExclusionOf`">
	<cfargument name="unless" type="string" required="false" default="" hint="See documentation for `validatesExclusionOf`">
	<cfset $registerValidation(methods="$validateNumericalityOf", argumentCollection=arguments)>
</cffunction>

<cffunction name="validatesPresenceOf" returntype="void" access="public" output="false" hint="Validates that the specified property exists and that its value is not blank.">
	<cfargument name="properties" type="string" required="false" default="" hint="See documentation for `validatesExclusionOf`">
	<cfargument name="message" type="string" required="false" default="#application.wheels.functions.validatesPresenceOf.message#" hint="See documentation for `validatesExclusionOf`">
	<cfargument name="when" type="string" required="false" default="onSave" hint="See documentation for `validatesExclusionOf`">
	<cfargument name="if" type="string" required="false" default="" hint="See documentation for `validatesExclusionOf`">
	<cfargument name="unless" type="string" required="false" default="" hint="See documentation for `validatesExclusionOf`">
	<cfset $registerValidation(methods="$validatePresenceOf", argumentCollection=arguments)>
</cffunction>

<cffunction name="validatesUniquenessOf" returntype="void" access="public" output="false" hint="Validates that the value of the specified property is unique in the database table. Useful for ensuring that two users can't sign up to a website with identical screen names for example. When a new record is created a check is made to make sure that no record already exists in the database with the given value for the specified property. When the record is updated the same check is made but disregarding the record itself.">
	<cfargument name="properties" type="string" required="false" default="" hint="See documentation for `validatesExclusionOf`">
	<cfargument name="message" type="string" required="false" default="#application.wheels.functions.validatesUniquenessOf.message#" hint="See documentation for `validatesExclusionOf`">
	<cfargument name="when" type="string" required="false" default="onSave" hint="See documentation for `validatesExclusionOf`">
	<cfargument name="allowBlank" type="boolean" required="false" default="#application.wheels.functions.validatesUniquenessOf.allowBlank#" hint="See documentation for `validatesExclusionOf`">
	<cfargument name="scope" type="string" required="false" default="" hint="One or more properties by which to limit the scope of the uniqueness constraint">
	<cfargument name="if" type="string" required="false" default="" hint="See documentation for `validatesExclusionOf`">
	<cfargument name="unless" type="string" required="false" default="" hint="See documentation for `validatesExclusionOf`">
	<cfscript>
		arguments.scope = Replace(arguments.scope, ", ", ",", "all");
		$registerValidation(methods="$validateUniquenessOf", argumentCollection=arguments);


<cffunction name="validate" returntype="void" access="public" output="false" hint="Register method(s) that should be called to validate objects before they are saved.">
	<cfargument name="methods" type="string" required="false" default="" hint="Method name or list of method names (can also be called with the `method` argument)">
	<cfargument name="if" type="string" required="false" default="" hint="See documentation for @validatesConfirmationOf.">
	<cfargument name="unless" type="string" required="false" default="" hint="See documentation for @validatesConfirmationOf.">
	<cfset $registerValidation(when="onSave", argumentCollection=arguments)>
</cffunction>

<cffunction name="validateOnCreate" returntype="void" access="public" output="false" hint="Register method(s) that should be called to validate new objects before they are inserted.">
	<cfargument name="methods" type="string" required="false" default="" hint="See `validate`">
	<cfargument name="if" type="string" required="false" default="" hint="See documentation for @validatesConfirmationOf.">
	<cfargument name="unless" type="string" required="false" default="" hint="See documentation for @validatesConfirmationOf.">
	<cfset $registerValidation(when="onCreate", argumentCollection=arguments)>
</cffunction>

<cffunction name="validateOnUpdate" returntype="void" access="public" output="false" hint="Register method(s) that should be called to validate existing objects before they are updated.">
	<cfargument name="methods" type="string" required="false" default="" hint="See `validate`">
	<cfargument name="if" type="string" required="false" default="" hint="See documentation for @validatesConfirmationOf.">
	<cfargument name="unless" type="string" required="false" default="" hint="See documentation for @validatesConfirmationOf.">
	<cfset $registerValidation(when="onUpdate", argumentCollection=arguments)>
</cffunction>

