|
ColdBox Platform v3.8.0 | ||||
FRAMES |
WEB-INF.cftags.interfacecoldbox.system.validation.IValidationManager
public interface 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 |
coldbox.system.validation.IValidationResult |
validate(any target, [string fields], [any constraints], [string locale=''], [string excludeFields=''])
Validate an object |
Methods inherited from class WEB-INF.cftags.interface |
---|
None
|
Method Detail |
---|
public IValidationManager addSharedConstraint(string name, struct constraint)
name
- Filter by name or notconstraint
- The constraint to store.public struct getSharedConstraints([string name])
name
- Filter by name or notpublic IValidationManager setSharedConstraints([struct constraints])
constraints
- Filter by name or notpublic boolean sharedConstraintsExists(string name)
name
- The shared constraint to checkpublic coldbox.system.validation.IValidationResult validate(any target, [string fields], [any constraints], [string locale=''], [string excludeFields=''])
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.
|
ColdBox Platform v3.8.0 | ||||
FRAMES |