|
ValidateThis API Documentation | ||||
| FRAMES | |||||
WEB-INF.cftags.component
ValidateThis.util.Result
public class Result
I am a transient result object.
| Constructor Summary | |
|---|---|
Init(any Translator, struct ValidateThisConfig)
I am the constructor |
|
| Method Summary | |
|---|---|
struct |
GetErrors([Any locale='[runtime expression]'])
I get the Error collection as expected from ModelGlue |
boolean |
HasErrors([string PropertyName=''])
I implement part of the ModelGlue |
void |
Merge(any ValidationErrorCollection)
I merge a ModelGlue |
void |
addFailure([struct failure='[runtime expression]'], [string propertyName=''], [string clientFieldName='[runtime expression]'], [string type=''], [string message=''], [any theObject=''], [string objectType=''])
adds a Failure to the collection of failures in the object |
void |
addResult(any theResult)
Pass in a Result object and I will add it to the current Result object |
array |
getDebugging()
I return an array of rules/conditions which have been evaluated |
string |
getDebuggingMode()
I return the debugging mode |
array |
getFailureMessages([Any locale='[runtime expression]'])
I return all failure messages as an array of strings |
struct |
getFailureMessagesByField([Any limit=''], [string delimiter=''], [Any locale='[runtime expression]'])
Returns a structure containing a list of failure messages for each clientFieldName |
struct |
getFailureMessagesByProperty([Any limit=''], [string delimiter=''], [Any locale='[runtime expression]'])
Returns a structure containing a list of failure messages for each propertyName |
any |
getFailures([Any locale='[runtime expression]'])
returns all failures as an array of structs |
any |
getFailuresAsString([string delim='
I return the errors as a string separated with a specified delimiter |
any |
getFailuresAsStruct([Any locale='[runtime expression]'])
Deprecated |
any |
getFailuresAsValidationErrorCollection([Any locale='[runtime expression]'])
I return failures in a format expected from a ModelGlue |
struct |
getFailuresByField([Any limit=''], [Any locale='[runtime expression]'])
Returns a structure containing an array of failures for each clientFieldName |
private struct |
getFailuresByFieldOrProperty(Any keyType, boolean messageOnly, [Any limit=''], [string delimiter=''], [Any locale='[runtime expression]'])
Returns a structure containing an array of failures for each propertyName |
struct |
getFailuresByProperty([Any limit=''], [Any locale='[runtime expression]'])
Returns a structure containing an array of failures for each propertyName |
any |
getFailuresForUniForm([Any locale='[runtime expression]'])
Returns a structure of failures in a format the cfUniform likes |
boolean |
getIsSuccess()
|
any |
getMemento()
|
any |
getRawFailures()
returns the internal array of failure structs |
any |
getSuccessMessage()
|
any |
getTheObject()
|
void |
logCriteriaOutcome(string classname, string context, any criteria, string passed)
I log the outcome when a rule/condition is evaluated |
any |
onMissingMethod(string MissingMethodName, struct MissingMethodArguments)
provides for generic getter/setter |
void |
setIsSuccess(boolean IsSuccess)
|
void |
setSuccessMessage(any SuccessMessage)
|
void |
setTheObject(any theObject)
|
| Methods inherited from class WEB-INF.cftags.component |
|---|
|
| Constructor Detail |
|---|
Public Init(any Translator, struct ValidateThisConfig)
TranslatorValidateThisConfig| Method Detail |
|---|
public struct GetErrors([Any locale='[runtime expression]'])
localepublic boolean HasErrors([string PropertyName=''])
PropertyName - You can check for errors on a specific property by passing me.public void Merge(any ValidationErrorCollection)
ValidationErrorCollection - I am the Result to merge.public void addFailure([struct failure='[runtime expression]'], [string propertyName=''], [string clientFieldName='[runtime expression]'], [string type=''], [string message=''], [any theObject=''], [string objectType=''])
failure - a struct with keys describing the failure. It must contain a Message key if it is the only argument passedpropertyName - The name of the property that caused the failureclientFieldName - The name of the form field that caused the failuretype - The type of validation that caused the failuremessage - The message to be displayedtheObject - The object that was being validatedobjectType - The type of object that was being validatedpublic void addResult(any theResult)
theResultpublic array getDebugging()
public string getDebuggingMode()
public array getFailureMessages([Any locale='[runtime expression]'])
localepublic struct getFailureMessagesByField([Any limit=''], [string delimiter=''], [Any locale='[runtime expression]'])
limit - The maximum number of messages to return per fielddelimiter - A delimeter to use to separate messages per field. Blank creates an array instead of a string.localepublic struct getFailureMessagesByProperty([Any limit=''], [string delimiter=''], [Any locale='[runtime expression]'])
limit - The maximum number of messages to return per propertydelimiter - A delimeter to use to separate messages per property. Blank creates an array instead of a string.localepublic any getFailures([Any locale='[runtime expression]'])
locale - the locale to use to translate the failure messagespublic any getFailuresAsString([string delim='
'], [Any locale='[runtime expression]'])
delim - The delimiter to use to separate messageslocalepublic any getFailuresAsStruct([Any locale='[runtime expression]'])
localepublic any getFailuresAsValidationErrorCollection([Any locale='[runtime expression]'])
localepublic struct getFailuresByField([Any limit=''], [Any locale='[runtime expression]'])
limit - The maximum number of failures to return per fieldlocaleprivate struct getFailuresByFieldOrProperty(Any keyType, boolean messageOnly, [Any limit=''], [string delimiter=''], [Any locale='[runtime expression]'])
keyType - Should be either ClientFieldName or PropertyNamemessageOnly - Should only the failure messages be returned, or the complete failure struct?limit - The maximum number of failures to return per field or propertydelimiter - A delimeter to use to separate messages per property. Blank creates an array instead of a string.localepublic struct getFailuresByProperty([Any limit=''], [Any locale='[runtime expression]'])
limit - The maximum number of failures to return per propertylocalepublic any getFailuresForUniForm([Any locale='[runtime expression]'])
localepublic boolean getIsSuccess()
public any getMemento()
public any getRawFailures()
public any getSuccessMessage()
public any getTheObject()
public void logCriteriaOutcome(string classname, string context, any criteria, string passed)
classnamecontextcriteriapassedpublic any onMissingMethod(string MissingMethodName, struct MissingMethodArguments)
MissingMethodNameMissingMethodArgumentspublic void setIsSuccess(boolean IsSuccess)
IsSuccesspublic void setSuccessMessage(any SuccessMessage)
SuccessMessagepublic void setTheObject(any theObject)
theObject
|
ValidateThis API Documentation | ||||
| FRAMES | |||||