cbvalidation.IValidationManager
| Method Summary | |
|---|---|
IValidationManager
|
addSharedConstraint(string name, struct constraint)
Store a shared constraint. |
struct
|
getSharedConstraints([string name])
Retrieve the shared constraints. |
IValidationManager
|
setSharedConstraints([struct constraints])
Set the shared constraints into the validation manager, usually these are described in the ColdBox configuraiton file. |
boolean
|
sharedConstraintsExists(string name)
Check if a shared constraint exists by name. |
cbvalidation.IValidationResult
|
validate(any target, [string fields], [any constraints], [string locale], [string excludeFields], [string includeFields])
Validate an object. |
| Method Detail |
|---|
Store a shared constraint
name - Filter by name or notconstraint - The constraint to store.Retrieve the shared constraints
name - Filter by name or notSet the shared constraints into the validation manager, usually these are described in the ColdBox configuraiton file
constraints - Filter by name or notCheck if a shared constraint exists by name
name - The shared constraint to checkValidate an object
target - The target object to validatefields - One or more fields to validate on, by default it validates all fields in the constraints. This can be a simple list or an array.constraints - An optional shared constraints name or an actual structure of constraints to validate on.locale - An optional locale to use for i18n messagesexcludeFields - An optional list of fields to exclude from the validation.includeFields - An optional list of fields to include in the validation.