FORGEBOX Enterprise 🚀 - Take your ColdFusion (CFML) Development to Modern Times! Learn More...

ColdBox Validation

Build Status


This module is a server side rules validation engine that can provide you with a unified approach to object, struct and form validation. You can construct validation constraint rules and then tell the engine to validate them accordingly.


Apache License, Version 2.0.




  • Lucee 4.5+
  • Adobe ColdFusion 11+


Just drop into your modules folder or use CommandBox to install:

box install cbvalidation

The module will register several objects into WireBox using the @cbvalidation namespace. The validation manager is registered as [email protected]. It will also register several helper methods that can be used throughout the ColdBox application.


The module will also register two methods in your handlers/interceptors/layouts/views

* Validate an object or structure according to the constraints rules.
* @target An object or structure to validate
* @fields The fields to validate on the target. By default, it validates on all fields
* @constraints A structure of constraint rules or the name of the shared constraint rules to use for validation
* @locale The i18n locale to use for validation messages
* @excludeFields The fields to exclude in the validation
* @includeFields The fields to include ONLY in the validation
* @return cbvalidation.model.result.IValidationResult
function validateModel()

* Retrieve the application's configured Validation Manager
function getValidationManager()


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

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 }


You can read more about ColdBox Validation here: -

Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp | |


Because of His grace, this project exists. If you don't like this, then don't read it, its not for you.

"Therefore being justified by faith, we have peace with God through our Lord Jesus Christ: By whom also we have access by faith into this grace wherein we stand, and rejoice in hope of the glory of God. And not only so, but we glory in tribulations also: knowing that tribulation worketh patience; And patience, experience; and experience, hope: And hope maketh not ashamed; because the love of God is shed abroad in our hearts by the Holy Ghost which is given unto us. ." Romans 5:5


"I am the way, and the truth, and the life; no one comes to the Father, but by me (JESUS)" Jn 14:1-12



  • Location protocol


  • Updated to new layout
  • UDFValidator added rejectedValue to newError arguments:
  • Removed lucee 4.5 support
  • Mixins missing comma on arguments
  • Switching evaluate to invoke for security and performance
  • Fix for passing arguments in newError() on the validation result object


  • Build updates and travis updates
  • Unified Workbench
  • MaxValidator The Max validator needs to better reflect that it can be less than or equal to the number to compare to <=
  • MinValidator The explanation needs to better reflect the min validator which is >=
  • Allow custom validators to be specified just by key and the payload to be passed in as validation data
  • GenericObject Should return null on non-existent keys instead of an exception if not we cannot validate nullness
  • You can now pass a list of fields to ONLY validate via validate() methods using the includeFields argument.


  • Dependency updates


  • Updated cbi18n dependency to latest
  • Travis updates
  • Type validator not countaing against 0 length values
  • Size validator typos
  • Migration to new github organization


  • Updated cbi18n dependency to version 1.2.0
  • SizeValidator not evaluating correctly non-required fields
  • Travis integration
  • Build script updates
  • Added array validation thanks to Sana Ullah


  • Exception on Lucee/Railo reporting wrong interface types when using imports
  • Exception message was wrong on UDFValidator
  • Ignore invalid validator keys, to allow for extra metadata and custom messages


  • production ignore lists
  • Unloading of helpers


  • Force the validation manager binder mapping
  • ValidationManager missing singleton persistance


  • Create first module version

Here are all the versions for this package. Please note that you can leverage CommandBox package versioning to install any package you like. Please refer to our managing package version guide for more information.

Version Created Last Update Published By Stable Download
1.5.0-snapshot Mar 05 2019 02:34 PM Mar 06 2019 09:34 AM Ortus Solutions (ortus)
1.4.1+69 Mar 06 2019 11:37 AM Mar 06 2019 11:37 AM Ortus Solutions (ortus)
1.4.1-snapshot Mar 06 2019 11:32 AM Mar 06 2019 11:32 AM Ortus Solutions (ortus)
1.4.0+63 Mar 05 2019 02:28 PM Mar 06 2019 06:54 AM Ortus Solutions (ortus)
1.4.0+60 Mar 05 2019 10:58 AM Mar 06 2019 06:54 AM Ortus Solutions (ortus)
1.4.0-snapshot Dec 04 2017 03:19 PM Mar 05 2019 02:21 PM Ortus Solutions (ortus)
1.3.1+51 Dec 01 2017 02:17 PM Dec 01 2017 02:17 PM Ortus Solutions (ortus)
1.3.1-snapshot Dec 01 2017 10:03 AM Dec 01 2017 10:03 AM Ortus Solutions (ortus)
1.3.0+47 Nov 30 2017 04:44 PM Nov 30 2017 04:44 PM Ortus Solutions (ortus)
1.3.0-snapshot Nov 30 2017 04:23 PM Nov 30 2017 04:23 PM Ortus Solutions (ortus)
1.2.1+29 Nov 04 2016 12:14 PM Nov 04 2016 12:14 PM Ortus Solutions (ortus)
1.2.0+24 Oct 09 2016 10:43 AM Oct 09 2016 10:43 AM Ortus Solutions (ortus)
1.1.0 May 03 2014 12:34 PM Jun 10 2016 03:18 AM Ortus Solutions (ortus)


No collaborators yet.
  • May 03 2014 12:34 PM
  • Mar 06 2019 11:37 AM
  • 4162
  • 2397
  • 42064