How_ValidateThis_Finds_Your_Rules_Definition_Files

last edited byusericonBob on 31-Oct-2011

Contents

How ValidateThis Finds Your Rules Definition Files

Configuring the Location

ValidateThis uses the value stored in the definitionPath key of its configuration struct to decide where to look for your rules definition files. You can provide a value for that key when you initialize the framework, or simply accept the default value of /model/.


Where ValidateThis Looks for Your Files


How to Name Your Files

You can name your files either with an extension of .xml or .xml.cfm.


Detailed Example of Locating Files

Based on all of the behaviour described above, assuming that definitionPath has a value of /myModel/, /common/model/, when you ask the framework to perform an operation on a User object, it will search in the following locations:

  1. /myModel/User.xml
  2. /myModel/User.xml.cfm
  3. /myModel/User/User.xml
  4. /myModel/User/User.xml.cfm
  5. /common/model/User.xml
  6. /common/model/User.xml.cfm
  7. /common/model/User/User.xml
  8. /common/model/User/User.xml.cfm

Note that the framework will only perform this search the first time an operation is requested on an object, after which the contents of the rules definition file will be cached within the framework.

 
Download in other Formats:
markup Markup | pdf PDF | swf SWF | html HTML | word Word

comments Comments (0)