cbValidation
v2.x
v2.x
  • Introduction
  • Intro
    • Release History
      • What's New With 2.1.0
      • What's New With 2.0.0
    • About This Book
      • Author
  • Overview
    • Installation
    • Configuration
    • Declaring Constraints
      • Configuration File
      • Domain Object
      • A-la-carte
    • Available Constraints
      • Custom Message Replacements
      • Constraint Custom Messages
    • Validating Constraints
      • Validating With Failures
      • Validating with shared constraints
      • Validating with a-la-carte constraints
      • Validating Custom Fields
      • Validating With Profiles
    • Displaying Errors
    • WireBox Integration
  • Advanced
    • Custom Validators
    • Unique ORM Validator
    • i18n Integration
    • Custom Validation Managers
Powered by GitBook
On this page

Was this helpful?

Edit on Git
Export as PDF
  1. Overview

Configuration

Here are the module settings you can place in your ColdBox.cfc by using the validation settings structure:

config/Coldbox.cfc
validation = {
    // The third-party validation manager to use, by default it uses CBValidation.
    manager = "class path",
    // You can store global constraint rules here with unique names
    sharedConstraints = {
        name = {
            field = { constraints here }
        }
    }

}

Key

Type

Required

Default

Description

manager

instantiation path or WireBox ID

false

cbValidation.models.ValidationManager

You can override the module manager with your own implementation. Just use an instantiation path or a valid WireBox object id.

sharedConstraints

struct

false

{}

This structure will hold all of your shared constraints for forms or/and objects.

Important: The module will register several objects into WireBox using the @cbvalidation namespace. The validation manager is registered as ValidationManager@cbvalidation

PreviousInstallationNextDeclaring Constraints

Last updated 5 years ago

Was this helpful?